Beispiel #1
0
        public Chat(Connections.Connection c, ChatType chatType)
        {
            name  = "";
            type  = chatType;
            conn  = c;
            users = new Dictionary <string, User>();

            System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(spawnIrcWindow));
            t.Start();
        }
Beispiel #2
0
 public IrcWindow(Connection c, Chat chat)
 {
     InitializeComponent();
     UsersList.DisplayMember = "displayNick";
     conn      = c;
     this.chat = chat;
     if (chat.GetChatType() == Chat.ChatType.CHANNEL)
     {
         TopicPanel.Enabled   = true;
         TopicPanel.Visible   = true;
         TopicTextBox.Enabled = true;
         TopicTextBox.Visible = true;
     }
 }
        public static void GetSize(ref int Height, ref int Width, Connections.Connection Connection, DesktopSize Size)
        {
            switch (Size)
            {
            case DesktopSize.x640:
                Width  = 640;
                Height = 480;
                break;

            case DesktopSize.x800:
                Width  = 800;
                Height = 600;
                break;

            case DesktopSize.x1024:
                Width  = 1024;
                Height = 768;
                break;

            case DesktopSize.x1280:
                Width  = 1280;
                Height = 1024;
                break;

            case DesktopSize.FitToWindow:
                Width  = Connection.TerminalTabPage.Width;
                Height = Connection.TerminalTabPage.Height;
                break;

            case DesktopSize.FullScreen:
                Width  = Screen.FromControl(Connection).Bounds.Width;
                Height = Screen.FromControl(Connection).Bounds.Height - 1;
                break;

            case DesktopSize.AutoScale:
                Width  = Screen.FromControl(Connection).Bounds.Width;
                Height = Screen.FromControl(Connection).Bounds.Height - 1;
                break;

            case DesktopSize.Custom:
                break;
            }
            int maxWidth  = Settings.SupportsRDP6 ? 4096 : 1600;
            int maxHeight = Settings.SupportsRDP6 ? 2048 : 1200;

            Width  = Math.Min(maxWidth, Width);
            Height = Math.Min(maxHeight, Height);;
        }
 public Log141ProxyViewModel(IRuntimeService runtime, Connections.Connection connection) : base(connection, WMLSVersion.WITSML141)
 {
     Runtime   = runtime;
     Generator = new Log141Generator();
 }
Beispiel #5
0
 public Chat(Connections.Connection c, ChatType chatType, String name) : this(c, chatType)
 {
     this.name = name;
 }
Beispiel #6
0
        public IEnumerator<IModel> GetEnumerator()
        {
            Connections.IConnection conn = new Connections.Connection();
            object[][] res = conn.Execute(this.query);
            IModel o;
            Dictionary<string, object> dict;
            QuerySetStorageKey storage_key;
            foreach (object[] row in res)
            {
                // need to instantiate a model here, to get the ModelMeta
                o = (IModel)(Activator.CreateInstance(this.query.Model));

                storage_key = new QuerySetStorageKey(
                    this.query.Model,
                    row[o.Meta.GetFieldIndex(o.Meta.PrimaryKey.DbField)]
                );
                try
                {
                    o = storage.Get(storage_key);
                }
                catch (KeyNotFoundException)
                {
                    dict = o.Meta.PrepareRowForInstance(row);
                    foreach (string key in dict.Keys)
                    {
                        o.Set(key, dict[key]);
                    }
                    this.storage.Set(storage_key, o);
                }
                yield return o;
            }
        }