コード例 #1
0
ファイル: Chat.cs プロジェクト: PhoenixFlight/WinIRCL
        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();
        }
コード例 #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;
     }
 }
コード例 #3
0
        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);;
        }
コード例 #4
0
 public Log141ProxyViewModel(IRuntimeService runtime, Connections.Connection connection) : base(connection, WMLSVersion.WITSML141)
 {
     Runtime   = runtime;
     Generator = new Log141Generator();
 }
コード例 #5
0
ファイル: Chat.cs プロジェクト: PhoenixFlight/WinIRCL
 public Chat(Connections.Connection c, ChatType chatType, String name) : this(c, chatType)
 {
     this.name = name;
 }
コード例 #6
0
ファイル: QuerySets.cs プロジェクト: kurvenschubser/goil-orm
        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;
            }
        }