Пример #1
0
        protected void Build()
        {
            //global::Stetic.Gui.Initialize(this);
            this._chatTabs             = new global::Gtk.Notebook();
            this._chatTabs.CanFocus    = true;
            this._chatTabs.Name        = "_chatTabs";
            this._chatTabs.CurrentPage = 0;
            this._chatTabs.EnablePopup = true;
            this._chatTabs.Scrollable  = true;

            // Widget OpenGraal.GraalIM.RCWindow
            this.Name = "OpenGraal.GraalIM.RCWindow";
            DateTime buildDate = this.GetBuildDateTime();
            string   Month     = buildDate.Month.ToString();

            if (Month.Length == 1)
            {
                Month = "0" + Month;
            }
            string Day = buildDate.Day.ToString();

            if (Day.Length == 1)
            {
                Day = "0" + Day;
            }
            this.Title          = global::Mono.Unix.Catalog.GetString("OpenGraal Remote Control " + buildDate.Year.ToString() + "/" + Month + "/" + Day);
            this.Icon           = global::Gdk.Pixbuf.LoadFromResource("OpenGraal.GraalIM.Resources.rcicon.ico");
            this.WindowPosition = ((global::Gtk.WindowPosition)(4));

            // Container child OpenGraal.GraalIM.RCWindow.Gtk.Container+ContainerChild
            this.table2      = new global::Gtk.Table(((uint)(2)), ((uint)(1)), false);
            this.table2.Name = "table2";

            global::Gtk.Table RCChat = new global::Gtk.Table(((uint)(2)), ((uint)(1)), false);
            RCChat.Name = "RCChat";


            // Container child table2.Gtk.Table+TableChild
            this.RCChatBar                = new global::Gtk.Entry();
            this.RCChatBar.CanFocus       = true;
            this.RCChatBar.Name           = "entry1";
            this.RCChatBar.IsEditable     = true;
            this.RCChatBar.InvisibleChar  = '•';
            this.RCChatBar.KeyPressEvent += IRC_ChatBar;
            Gdk.Color chatBarBgColor = new Gdk.Color();
            Gdk.Color.Parse(this.rcSettings.ColorEditBack, ref chatBarBgColor);
            Gdk.Color chatBarTextColor = new Gdk.Color();
            Gdk.Color.Parse(this.rcSettings.ColorChatBack, ref chatBarTextColor);
            this.RCChatBar.ModifyText(Gtk.StateType.Normal, chatBarTextColor);
            this.RCChatBar.ModifyBase(Gtk.StateType.Normal, chatBarBgColor);
            RCChat.Add(this.RCChatBar);
            global::Gtk.Table.TableChild w1 = ((global::Gtk.Table.TableChild)(RCChat[this.RCChatBar]));
            w1.TopAttach    = ((uint)(1));
            w1.BottomAttach = ((uint)(2));
            w1.XOptions     = ((global::Gtk.AttachOptions)(4));
            w1.YOptions     = ((global::Gtk.AttachOptions)(4));
            // Container child table2.Gtk.Table+TableChild
            this.GtkScrolledWindow            = new global::Gtk.ScrolledWindow();
            this.GtkScrolledWindow.Name       = "GtkScrolledWindow";
            this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
            // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
            this.textview1                  = new global::Gtk.TextView();
            this.textview1.CanFocus         = true;
            this.textview1.Name             = "textview1";
            this.textview1.Editable         = false;
            this.textview1.WrapMode         = ((global::Gtk.WrapMode)(3));
            this.textview1.PixelsInsideWrap = 7;
            this.textview1.AppPaintable     = true;
            Gdk.Color bgColor = new Gdk.Color();
            Gdk.Color.Parse(this.rcSettings.ColorChatBack, ref bgColor);
            this.textview1.ModifyBase(Gtk.StateType.Normal, bgColor);

            this.GtkScrolledWindow.Add(this.textview1);
            RCChat.Add(this.GtkScrolledWindow);
            global::Gtk.Table.TableChild w3sc = ((global::Gtk.Table.TableChild)(RCChat[this.GtkScrolledWindow]));
            w3sc.TopAttach    = ((uint)(0));
            w3sc.BottomAttach = ((uint)(1));
            global::Gtk.Label RCChatLabel = new global::Gtk.Label();
            RCChatLabel.Text = "RC Chat";

            this._chatTabs.Add(RCChat);
            this._chatTabs.SetTabLabel(RCChat, RCChatLabel);
            RCChatLabel.ShowAll();
            //this._chatTabs.

            this.table2.Add(this._chatTabs);
            global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table2[this._chatTabs]));
            w3.TopAttach    = ((uint)(1));
            w3.BottomAttach = ((uint)(2));
            //w1.XOptions = ((global::Gtk.AttachOptions)(4));
            //w3.YOptions = global::Gtk.AttachOptions.Fill;
            //this._chatTabs.


            // Container child table2.Gtk.Table+TableChild
            this.table3 = new global::Gtk.Table(((uint)(2)), ((uint)(1)), false);
            this.table3.WidthRequest  = 476;
            this.table3.HeightRequest = 136;
            this.table3.Name          = "table3";
            // Container child table3.Gtk.Table+TableChild
            this.ButtonTable               = new global::Gtk.Table(((uint)(3)), ((uint)(7)), false);
            this.ButtonTable.Name          = "table4";
            this.ButtonTable.RowSpacing    = ((uint)(1));
            this.ButtonTable.ColumnSpacing = ((uint)(1));
            this.ButtonTable.BorderWidth   = ((uint)(5));
            // Container child table4.Gtk.Table+TableChild
            this.ServerNameAndSuch           = new global::Gtk.Fixed();
            this.ServerNameAndSuch.Name      = "fixed2";
            this.ServerNameAndSuch.HasWindow = false;
            this.ButtonTable.Add(this.ServerNameAndSuch);
            global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.ButtonTable[this.ServerNameAndSuch]));
            w4.BottomAttach = ((uint)(3));
            w4.LeftAttach   = ((uint)(3));
            w4.RightAttach  = ((uint)(4));
            w4.YOptions     = ((global::Gtk.AttachOptions)(0));
            this.table3.Add(this.ButtonTable);
            global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table3[this.ButtonTable]));
            w5.YPadding = ((uint)(11));
            w5.YOptions = global::Gtk.AttachOptions.Fill;            //((global::Gtk.AttachOptions)(4));
            this.table2.Add(this.table3);
            global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.table2[this.table3]));
            w6.YOptions = ((global::Gtk.AttachOptions)(4));
            this.Add(this.table2);
            if ((this.Child != null))
            {
                this.Child.ShowAll();
            }
            this.DefaultWidth  = 476;
            this.DefaultHeight = 310;
            this.Show();
            //this.ResizeChecked += new global::System.EventHandler(this.OnResize);
        }
Пример #2
0
        protected void Build()
        {
            //global::Stetic.Gui.Initialize(this);
            this._chatTabs = new global::Gtk.Notebook();
            this._chatTabs.CanFocus = true;
            this._chatTabs.Name = "_chatTabs";
            this._chatTabs.CurrentPage = 0;
            this._chatTabs.EnablePopup = true;
            this._chatTabs.Scrollable = true;

            // Widget OpenGraal.GraalIM.RCWindow
            this.Name = "OpenGraal.GraalIM.RCWindow";
            this.Title = global::Mono.Unix.Catalog.GetString("OpenGraal Remote Control 2013/12/02");
            this.Icon = global::Gdk.Pixbuf.LoadFromResource("OpenGraal.GraalIM.Resources.rcicon.ico");
            this.WindowPosition = ((global::Gtk.WindowPosition)(4));

            // Container child OpenGraal.GraalIM.RCWindow.Gtk.Container+ContainerChild
            this.table2 = new global::Gtk.Table(((uint)(2)), ((uint)(1)), false);
            this.table2.Name = "table2";

            global::Gtk.Table RCChat = new global::Gtk.Table(((uint)(2)), ((uint)(1)), false);
            RCChat.Name = "RCChat";

            // Container child table2.Gtk.Table+TableChild
            this.RCChatBar = new global::Gtk.Entry();
            this.RCChatBar.CanFocus = true;
            this.RCChatBar.Name = "entry1";
            this.RCChatBar.IsEditable = true;
            this.RCChatBar.InvisibleChar = '•';
            this.RCChatBar.KeyPressEvent += IRC_ChatBar;
            Gdk.Color chatBarBgColor = new Gdk.Color();
            Gdk.Color.Parse(this.rcSettings.ColorEditBack, ref chatBarBgColor);
            Gdk.Color chatBarTextColor = new Gdk.Color();
            Gdk.Color.Parse(this.rcSettings.ColorChatBack, ref chatBarTextColor);
            this.RCChatBar.ModifyText(Gtk.StateType.Normal, chatBarTextColor);
            this.RCChatBar.ModifyBase(Gtk.StateType.Normal, chatBarBgColor);
            RCChat.Add(this.RCChatBar);
            global::Gtk.Table.TableChild w1 = ((global::Gtk.Table.TableChild)(RCChat[this.RCChatBar]));
            w1.TopAttach = ((uint)(1));
            w1.BottomAttach = ((uint)(2));
            w1.XOptions = ((global::Gtk.AttachOptions)(4));
            w1.YOptions = ((global::Gtk.AttachOptions)(4));
            // Container child table2.Gtk.Table+TableChild
            this.GtkScrolledWindow = new global::Gtk.ScrolledWindow();
            this.GtkScrolledWindow.Name = "GtkScrolledWindow";
            this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
            // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
            this.textview1 = new global::Gtk.TextView();
            this.textview1.CanFocus = true;
            this.textview1.Name = "textview1";
            this.textview1.Editable = false;
            this.textview1.WrapMode = ((global::Gtk.WrapMode)(3));
            this.textview1.PixelsInsideWrap = 7;
            this.textview1.AppPaintable = true;
            Gdk.Color bgColor = new Gdk.Color();
            Gdk.Color.Parse(this.rcSettings.ColorChatBack, ref bgColor);
            this.textview1.ModifyBase(Gtk.StateType.Normal, bgColor);

            this.GtkScrolledWindow.Add(this.textview1);
            RCChat.Add(this.GtkScrolledWindow);
            global::Gtk.Table.TableChild w3sc = ((global::Gtk.Table.TableChild)(RCChat[this.GtkScrolledWindow]));
            w3sc.TopAttach = ((uint)(0));
            w3sc.BottomAttach = ((uint)(1));
            global::Gtk.Label RCChatLabel = new global::Gtk.Label();
            RCChatLabel.Text = "RC Chat";

            this._chatTabs.Add(RCChat);
            this._chatTabs.SetTabLabel(RCChat, RCChatLabel);
            RCChatLabel.ShowAll();
            //this._chatTabs.

            this.table2.Add(this._chatTabs);
            global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table2[this._chatTabs]));
            w3.TopAttach = ((uint)(1));
            w3.BottomAttach = ((uint)(2));
            //w1.XOptions = ((global::Gtk.AttachOptions)(4));
            //w3.YOptions = global::Gtk.AttachOptions.Fill;
            //this._chatTabs.

            // Container child table2.Gtk.Table+TableChild
            this.table3 = new global::Gtk.Table(((uint)(2)), ((uint)(1)), false);
            this.table3.WidthRequest = 476;
            this.table3.HeightRequest = 136;
            this.table3.Name = "table3";
            // Container child table3.Gtk.Table+TableChild
            this.ButtonTable = new global::Gtk.Table(((uint)(3)), ((uint)(7)), false);
            this.ButtonTable.Name = "table4";
            this.ButtonTable.RowSpacing = ((uint)(1));
            this.ButtonTable.ColumnSpacing = ((uint)(1));
            this.ButtonTable.BorderWidth = ((uint)(5));
            // Container child table4.Gtk.Table+TableChild
            this.ServerNameAndSuch = new global::Gtk.Fixed();
            this.ServerNameAndSuch.Name = "fixed2";
            this.ServerNameAndSuch.HasWindow = false;
            this.ButtonTable.Add(this.ServerNameAndSuch);
            global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.ButtonTable[this.ServerNameAndSuch]));
            w4.BottomAttach = ((uint)(3));
            w4.LeftAttach = ((uint)(3));
            w4.RightAttach = ((uint)(4));
            w4.YOptions = ((global::Gtk.AttachOptions)(0));
            this.table3.Add(this.ButtonTable);
            global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table3[this.ButtonTable]));
            w5.YPadding = ((uint)(11));
            w5.YOptions = global::Gtk.AttachOptions.Fill;//((global::Gtk.AttachOptions)(4));
            this.table2.Add(this.table3);
            global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.table2[this.table3]));
            w6.YOptions = ((global::Gtk.AttachOptions)(4));
            this.Add(this.table2);
            if ((this.Child != null))
            {
                this.Child.ShowAll();
            }
            this.DefaultWidth = 476;
            this.DefaultHeight = 310;
            this.Show();
            //this.ResizeChecked += new global::System.EventHandler(this.OnResize);
        }
		public void OpenIRC(string channel)
		{
			Gtk.Application.Invoke(delegate
			{
				Gtk.Table Chat = this.FindPanel("irctab_" + channel);
				if (Chat == null)
				{
					Chat = new global::Gtk.Table(((uint)(2)), ((uint)(1)), false);
					Chat.Name = "irctab_" + channel;

					// Container child table2.Gtk.Table+TableChild
					global::Gtk.Entry ChatBar = new global::Gtk.Entry();
					ChatBar.CanFocus = true;
					ChatBar.Name = "irctab_" + channel + "_entry";
					ChatBar.IsEditable = true;
					ChatBar.InvisibleChar = '•';
					ChatBar.KeyPressEvent += IRC_ChatBar;
					Chat.Add(ChatBar);
					global::Gtk.Table.TableChild w1 = ((global::Gtk.Table.TableChild)(Chat[ChatBar]));
					w1.TopAttach = ((uint)(1));
					w1.BottomAttach = ((uint)(2));
					w1.XOptions = ((global::Gtk.AttachOptions)(4));
					w1.YOptions = ((global::Gtk.AttachOptions)(4));
					// Container child table2.Gtk.Table+TableChild
					global::Gtk.ScrolledWindow GtkScrolledWindow = new global::Gtk.ScrolledWindow();
					GtkScrolledWindow.Name = "GtkScrolledWindow";
					GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
					// Container child GtkScrolledWindow.Gtk.Container+ContainerChild
					global::Gtk.TextView textview1 = new global::Gtk.TextView();
					textview1.CanFocus = true;
					textview1.Name = "irctab_" + channel + "_textview";
					textview1.Editable = false;
					textview1.WrapMode = ((global::Gtk.WrapMode)(3));
					textview1.PixelsInsideWrap = 7;
					GtkScrolledWindow.Add(textview1);
					Chat.Add(GtkScrolledWindow);
					global::Gtk.Table.TableChild w3sc = ((global::Gtk.Table.TableChild)(Chat[GtkScrolledWindow]));
					w3sc.TopAttach = ((uint)(0));
					w3sc.BottomAttach = ((uint)(1));
					// Notebook tab
					Gtk.Label testLabel = new global::Gtk.Label();
					testLabel.CanDefault = true;
					testLabel.Name = "irctab_" + channel + "_label";
					testLabel.LabelProp = global::Mono.Unix.Catalog.GetString(channel);
					if (this.isRC)
					{

						this.rc.ChatTabs.AppendPage(Chat, testLabel);
						this.rc.ChatTabs.CurrentPage = this.rc.ChatTabs.PageNum(Chat);

					}
					else
					{
						this.mw.ChatTabs.AppendPage(Chat, testLabel);
						this.mw.ChatTabs.CurrentPage = this.mw.ChatTabs.PageNum(Chat);
					}

					testLabel.ShowAll();
					Chat.ShowAll();
					this.IRC_ChatWindowText(channel, "-!- You have joined " + channel);
				}
				else
				{
					if (this.isRC)
						this.rc.ChatTabs.CurrentPage = this.rc.ChatTabs.PageNum(Chat);
					else
						this.mw.ChatTabs.CurrentPage = this.mw.ChatTabs.PageNum(Chat);
				}
			}
			);
		}
        public void OpenIRC(string channel)
        {
            Gtk.Application.Invoke(delegate
            {
                Gtk.Table Chat = this.FindPanel("irctab_" + channel);
                if (Chat == null)
                {
                    Chat      = new global::Gtk.Table(((uint)(2)), ((uint)(1)), false);
                    Chat.Name = "irctab_" + channel;

                    // Container child table2.Gtk.Table+TableChild
                    global::Gtk.Entry ChatBar = new global::Gtk.Entry();
                    ChatBar.CanFocus          = true;
                    ChatBar.Name           = "irctab_" + channel + "_entry";
                    ChatBar.IsEditable     = true;
                    ChatBar.InvisibleChar  = '•';
                    ChatBar.KeyPressEvent += IRC_ChatBar;
                    Chat.Add(ChatBar);
                    global::Gtk.Table.TableChild w1 = ((global::Gtk.Table.TableChild)(Chat[ChatBar]));
                    w1.TopAttach    = ((uint)(1));
                    w1.BottomAttach = ((uint)(2));
                    w1.XOptions     = ((global::Gtk.AttachOptions)(4));
                    w1.YOptions     = ((global::Gtk.AttachOptions)(4));
                    // Container child table2.Gtk.Table+TableChild
                    global::Gtk.ScrolledWindow GtkScrolledWindow = new global::Gtk.ScrolledWindow();
                    GtkScrolledWindow.Name       = "GtkScrolledWindow";
                    GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
                    // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
                    global::Gtk.TextView textview1 = new global::Gtk.TextView();
                    textview1.CanFocus             = true;
                    textview1.Name             = "irctab_" + channel + "_textview";
                    textview1.Editable         = false;
                    textview1.WrapMode         = ((global::Gtk.WrapMode)(3));
                    textview1.PixelsInsideWrap = 7;
                    GtkScrolledWindow.Add(textview1);
                    Chat.Add(GtkScrolledWindow);
                    global::Gtk.Table.TableChild w3sc = ((global::Gtk.Table.TableChild)(Chat[GtkScrolledWindow]));
                    w3sc.TopAttach    = ((uint)(0));
                    w3sc.BottomAttach = ((uint)(1));
                    // Notebook tab
                    Gtk.Label testLabel  = new global::Gtk.Label();
                    testLabel.CanDefault = true;
                    testLabel.Name       = "irctab_" + channel + "_label";
                    testLabel.LabelProp  = global::Mono.Unix.Catalog.GetString(channel);
                    if (this.isRC)
                    {
                        this.rc.ChatTabs.AppendPage(Chat, testLabel);
                        this.rc.ChatTabs.CurrentPage = this.rc.ChatTabs.PageNum(Chat);
                    }
                    else
                    {
                        this.mw.ChatTabs.AppendPage(Chat, testLabel);
                        this.mw.ChatTabs.CurrentPage = this.mw.ChatTabs.PageNum(Chat);
                    }

                    testLabel.ShowAll();
                    Chat.ShowAll();
                    this.IRC_ChatWindowText(channel, "-!- You have joined " + channel);
                }
                else
                {
                    if (this.isRC)
                    {
                        this.rc.ChatTabs.CurrentPage = this.rc.ChatTabs.PageNum(Chat);
                    }
                    else
                    {
                        this.mw.ChatTabs.CurrentPage = this.mw.ChatTabs.PageNum(Chat);
                    }
                }
            }
                                   );
        }