Jump to content

C# My text scrolls from the bottom up


Recommended Posts

That as stated in the title my text scrolls from the bottom up, I want to make sure to scroll up and down

I think its to do with this function

private static void SortOutputHandler(object sendingProcess, DataReceivedEventArgs outLine)
        {
            if (!String.IsNullOrEmpty(outLine.Data))
            {
                if(sendingProcess.GetType() == typeof(Process))
                {
                    try
                    {
                        Process p = (Process)sendingProcess;
                        string name = p.StartInfo.WorkingDirectory.Split('/')[p.StartInfo.WorkingDirectory.Split('/').Length -2];
                        TabPage page = tc.TabPages[tc.TabPages.IndexOfKey(name)];
                        RichTextBox output = (RichTextBox)page.Controls[page.Controls.IndexOfKey("output_" + name)];
                        if (outLine.Data.Length > output.MaxLength)
                        {
                            output.Text = "";
                        }
                        if (!outLine.Data.StartsWith("[QUEST]") 
                            && !outLine.Data.StartsWith("MOB")
                            && !outLine.Data.StartsWith("SKILL")
                            && !outLine.Data.StartsWith("OBJ_PROTO")
                            && !outLine.Data.StartsWith("QUEST")
                            && !outLine.Data.StartsWith(" ")
                            && !outLine.Data.StartsWith("REFINE")
                            && !outLine.Data.StartsWith("ITEM")
                            && !outLine.Data.StartsWith("..")
                            //&& !outLine.Data.StartsWith("[PackageCryptInfo]")
                            && !outLine.Data.StartsWith("GROUP")
                            && !outLine.Data.StartsWith("SHOP_ITEM")
                            && !outLine.Data.StartsWith("Register")
                            && !outLine.Data.StartsWith("Land")
                            && !outLine.Data.StartsWith("LAND")
                            && !outLine.Data.StartsWith("Map")
                            && !outLine.Data.StartsWith("LoadMap")
                            && !outLine.Data.StartsWith("mob")
                            && !outLine.Data.StartsWith("ObjectProto")                            
                            && !outLine.Data.StartsWith("DROP_ITEM")
                            && !outLine.Data.StartsWith("ETC_DROP")
                            && !outLine.Data.StartsWith("ItemIDRange")
                            && !outLine.Data.StartsWith("FISH")
                            && startsWithInt(outLine.Data) == false
                            )
                            {
                                output.Text = outLine.Data + Environment.NewLine + output.Text;
                                switch(name)
                                {
                                    case "db":
                                        if (outLine.Data.StartsWith("ClientManager pointer is"))
                                        {
                                            status[name].Text = name + " is ONLINE";
                                            status[name].ForeColor = Color.Green;
                                        }
                                        break;
                                    case "auth":
                                        if (outLine.Data.StartsWith("[PackageCryptInfo]"))
                                        {
                                            status[name].Text = name + " is ONLINE";
                                            status[name].ForeColor = Color.Green;
                                        }
                                        break;
                                    default:
                                        if (outLine.Data.StartsWith("FinalizeBoot"))
                                        {
                                            status[name].Text = name + " is ONLINE";
                                            status[name].ForeColor = Color.Green;
                                        }
                                        break;
                                }
                            }                           
                    }
                    catch { }
                }
            }
        }

Thank you for your reply

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.