示例#1
0
		/// <summary>
		/// This method is required for Windows Forms designer support.
		/// Do not change the method contents inside the source code editor. The Forms designer might
		/// not be able to load this method if it was changed manually.
		/// </summary>
		private void InitializeComponent()
		{
			this.lbLog = new System.Windows.Forms.ListBox();
			this.SuspendLayout();
			// 
			// lbLog
			// 
			this.lbLog.Dock = System.Windows.Forms.DockStyle.Fill;
			this.lbLog.FormattingEnabled = true;
			this.lbLog.Location = new System.Drawing.Point(0, 0);
			this.lbLog.Name = "lbLog";
			this.lbLog.Size = new System.Drawing.Size(361, 409);
			this.lbLog.TabIndex = 1;
			// 
			// dfmReport
			// 
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.ClientSize = new System.Drawing.Size(361, 409);
			this.Controls.Add(this.lbLog);
			this.Name = "dfmReport";
			this.Text = "log";
			this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DfmReportFormClosing);
			this.Load += new System.EventHandler(this.DfmReportLoad);
			this.ResumeLayout(false);

		}
        public override object EditValue(ITypeDescriptorContext context,
                                         IServiceProvider provider, object value)
        {
            Helper.DataTypes dataTypeHelper = new DataTypes();

            wfes = provider.GetService(typeof(IWindowsFormsEditorService)) as
                   IWindowsFormsEditorService;

            if (wfes != null)
            {
                int index;
                System.Windows.Forms.ListBox listBox = new System.Windows.Forms.ListBox();
                foreach (string dictEntry in dataTypeHelper.RequiredDataTypes.Values)
                {
                    index = listBox.Items.Add(dictEntry);
                    if (dictEntry == dataTypeHelper.NativeDataType)
                    {
                        listBox.SelectedIndex = index;
                    }
                }

                listBox.BorderStyle  = System.Windows.Forms.BorderStyle.None;
                listBox.DoubleClick += new EventHandler(listBox_DoubleClick);
                listBox.Click       += new EventHandler(listBox_Click);

                wfes.DropDownControl(listBox);
                if (listBox.SelectedItem != null)
                {
                    value = listBox.SelectedItem;
                }
            }

            return(value);
        }
示例#3
0
 public CVentanaProcesos(CViewsManager vm)
 {
     view                      = (vm.getFirstView("GestorProcesos.VentanaProcesos") != null)? vm.getFirstView("GestorProcesos.VentanaProcesos"): vm.AddView("GestorProcesos.VentanaProcesos");
     VentanaProcesos           = (System.Windows.Forms.UserControl)view.getCtrl("GestorProcesos.VentanaProcesos");
     VentanaProcesos_cstr      = view.getCtrlStruct("GestorProcesos.VentanaProcesos");
     tabProcesos               = (System.Windows.Forms.TabControl)view.getCtrl("tabProcesos");
     tabProcesos_cstr          = view.getCtrlStruct("tabProcesos");
     Pcontent                  = (System.Windows.Forms.TabPage)view.getCtrl("Pcontent");
     Pcontent_cstr             = view.getCtrlStruct("Pcontent");
     PProcessPanel             = (System.Windows.Forms.TabPage)view.getCtrl("PProcessPanel");
     PProcessPanel_cstr        = view.getCtrlStruct("PProcessPanel");
     PLeft                     = (System.Windows.Forms.Panel)view.getCtrl("PLeft");
     PLeft_cstr                = view.getCtrlStruct("PLeft");
     PProcessList              = (System.Windows.Forms.Panel)view.getCtrl("PProcessList");
     PProcessList_cstr         = view.getCtrlStruct("PProcessList");
     LProcess                  = (System.Windows.Forms.ListBox)view.getCtrl("LProcess");
     LProcess_cstr             = view.getCtrlStruct("LProcess");
     contextMenu_Proceso       = (System.Windows.Forms.ContextMenuStrip)view.getCtrl("contextMenu_Proceso");
     contextMenu_Proceso_cstr  = view.getCtrlStruct("contextMenu_Proceso");
     PProcessDir               = (System.Windows.Forms.Panel)view.getCtrl("PProcessDir");
     PProcessDir_cstr          = view.getCtrlStruct("PProcessDir");
     TV_Processes              = (System.Windows.Forms.TreeView)view.getCtrl("TV_Processes");
     TV_Processes_cstr         = view.getCtrlStruct("TV_Processes");
     contextMenu_Procesos      = (System.Windows.Forms.ContextMenuStrip)view.getCtrl("contextMenu_Procesos");
     contextMenu_Procesos_cstr = view.getCtrlStruct("contextMenu_Procesos");
 }
        public override object EditValue(ITypeDescriptorContext context,
                                         IServiceProvider provider, object value)
        {
            LocaleId localeId = new LocaleId();

            wfes = provider.GetService(typeof(IWindowsFormsEditorService)) as
                   IWindowsFormsEditorService;

            if (wfes != null)
            {
                int index;
                System.Windows.Forms.ListBox listBox = new System.Windows.Forms.ListBox();
                foreach (string lcid in LocaleId.LocaleIdList)
                {
                    index = listBox.Items.Add(lcid);
                    if (lcid == LocaleId.SelectedItem)
                    {
                        listBox.SelectedIndex = index;
                    }
                }

                listBox.BorderStyle  = System.Windows.Forms.BorderStyle.None;
                listBox.DoubleClick += new EventHandler(listBox_DoubleClick);
                listBox.Click       += new EventHandler(listBox_Click);

                wfes.DropDownControl(listBox);
                if (listBox.SelectedItem != null)
                {
                    value = listBox.SelectedItem;
                }
            }

            return(value);
        }
示例#5
0
 public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     List<string> lstToSel = this.GetListToSelect(context);
     IWindowsFormsEditorService service = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
     if (service != null)
     {
         System.Windows.Forms.ListBox lst = new System.Windows.Forms.ListBox();
         lst.Click += delegate(object sender, EventArgs e)
         {
             service.CloseDropDown();
         };
         // 选中原有值
         int iPos = -1;
         foreach (string s in lstToSel)
         {
             int i = lst.Items.Add(s);
             if (s.Equals(value)) iPos = i;
         }
         if (iPos != -1) lst.SelectedIndex = iPos;
         // 下拉
         service.DropDownControl(lst);
         if (lst.SelectedItem != null)
             value = lst.SelectedItem.ToString();
         else
             value = "";
     }
     return value;
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.listBox1 = new System.Windows.Forms.ListBox();
     this.SuspendLayout();
     //
     // listBox1
     //
     this.listBox1.DrawMode      = System.Windows.Forms.DrawMode.OwnerDrawVariable;
     this.listBox1.Location      = new System.Drawing.Point(16, 48);
     this.listBox1.Name          = "listBox1";
     this.listBox1.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
     this.listBox1.Size          = new System.Drawing.Size(256, 134);
     this.listBox1.TabIndex      = 0;
     this.listBox1.MeasureItem  += new System.Windows.Forms.MeasureItemEventHandler(this.listBox1_MeasureItem);
     this.listBox1.DrawItem     += new System.Windows.Forms.DrawItemEventHandler(this.listBox1_DrawItem);
     //
     // Form1
     //
     this.ClientSize = new System.Drawing.Size(292, 273);
     this.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.listBox1
     });
     this.Name = "Form1";
     this.Text = "Form1";
     this.ResumeLayout(false);
 }
示例#7
0
 public void AddProblemNameToListBox(System.Windows.Forms.ListBox lBxProblem)
 {
     foreach (Content content in listOfContent)
     {
         lBxProblem.Items.Add(content.Problem);
     }
 }
		public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
		{
			Reference retval = null;
			try
			{
				edSvc = (System.Windows.Forms.Design.IWindowsFormsEditorService)provider.GetService(typeof(System.Windows.Forms.Design.IWindowsFormsEditorService));

				var table = (Table)context.Instance;
				var root = (ModelRoot)table.Root;
				var referenceCollection = table.Columns;

				//Create the list box 
				var newBox = new System.Windows.Forms.ListBox();
				newBox.Click += new EventHandler(newBox_Click);
				newBox.IntegralHeight = false;

				newBox.Items.Add("(Not Set)");
				foreach(Reference reference in referenceCollection)
				{
					var column = ((ModelRoot)reference.Root).Database.Columns.GetById(reference.Ref)[0];
					newBox.Items.Add(column);
				}

				edSvc.DropDownControl(newBox);
				if((newBox.SelectedIndex > 0) && (newBox.SelectedItem != null))
					retval = ((Column)newBox.SelectedItem).CreateRef();

			}
			catch(Exception ex) { }
			return retval;
		}
示例#9
0
        /// <summary>
        /// Overrides the method used to provide basic behaviour for selecting editor.
        /// Shows our custom control for editing the value.
        /// </summary>
        /// <param name="context">The context of the editing control</param>
        /// <param name="provider">A valid service provider</param>
        /// <param name="value">The current value of the object to edit</param>
        /// <returns>The new value of the object</returns>
        public override object EditValue(ITypeDescriptorContext context,
                                         IServiceProvider provider, object value)
        {
            if (context != null && context.Instance != null && provider != null)
            {
                edSvc = (System.Windows.Forms.Design.IWindowsFormsEditorService)
                        provider.GetService(typeof(System.Windows.Forms.Design.IWindowsFormsEditorService));
                if (edSvc != null)
                {
                    lb                       = new System.Windows.Forms.ListBox();
                    lb.BorderStyle           = System.Windows.Forms.BorderStyle.None;
                    lb.SelectedIndexChanged += new EventHandler(lb_SelectedIndexChanged);
                    foreach (Control ctrl in ((Control)context.Instance).Page.Controls)
                    {
                        if (ctrl.GetType().IsSubclassOf(typeShow) ||
                            ctrl.GetType().FullName == typeShow.FullName)
                        {
                            lb.Items.Add(ctrl.ID);
                        }
                    }
                    edSvc.DropDownControl(lb);
                    if (lb.SelectedIndex == -1)
                    {
                        return(value);
                    }
                    return(lb.SelectedItem);
                }
            }

            return(value);
        }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.listBox1 = new System.Windows.Forms.ListBox();
     this.cmdTest  = new System.Windows.Forms.Button();
     this.SuspendLayout();
     //
     // listBox1
     //
     this.listBox1.FormattingEnabled = true;
     this.listBox1.Location          = new System.Drawing.Point(8, 8);
     this.listBox1.Name     = "listBox1";
     this.listBox1.Size     = new System.Drawing.Size(248, 160);
     this.listBox1.TabIndex = 0;
     //
     // cmdTest
     //
     this.cmdTest.Location = new System.Drawing.Point(12, 184);
     this.cmdTest.Name     = "cmdTest";
     this.cmdTest.Size     = new System.Drawing.Size(132, 28);
     this.cmdTest.TabIndex = 1;
     this.cmdTest.Text     = "Test Scroll";
     this.cmdTest.Click   += new System.EventHandler(this.cmdTest_Click);
     //
     // Recipe07_07
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(292, 246);
     this.Controls.Add(this.cmdTest);
     this.Controls.Add(this.listBox1);
     this.Name = "Recipe07_07";
     this.Text = "Recipe07_07";
     this.ResumeLayout(false);
 }
示例#11
0
 internal void WyswietlProdukty(System.Windows.Forms.ListBox listBox, List <string> wszystkieProdukty)
 {
     foreach (String item in wszystkieProdukty)
     {
         listBox.Items.Add(item);
     }
 }
示例#12
0
        public void EventAllConfigsLB_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e)
        {
            System.Windows.Forms.ListBox _ListBox = (System.Windows.Forms.ListBox)sender;

            e.DrawBackground();
            System.Drawing.Brush myBrush = System.Drawing.Brushes.White;
            string currentItem           = _ListBox.Items[e.Index].ToString();

            if (_ListBox.SelectedIndex != e.Index)//e.State != System.Windows.Forms.DrawItemState.Selected)//
            {
                string currItemValue = currentItem.Split('=').Last();
                if (currItemValue == "enabled")
                {
                    myBrush = System.Drawing.Brushes.DarkGreen;
                }
                else if (currItemValue == "disabled")
                {
                    myBrush = System.Drawing.Brushes.DarkRed;
                }
                else// if (currItemValue == "enabled(auto)")
                {
                    myBrush = System.Drawing.Brushes.Black;
                }
            }

            e.Graphics.DrawString(currentItem, e.Font, myBrush, e.Bounds, System.Drawing.StringFormat.GenericDefault);
        }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.listBoxLog = new System.Windows.Forms.ListBox();
     this.SuspendLayout();
     //
     // listBoxLog
     //
     this.listBoxLog.Dock = System.Windows.Forms.DockStyle.Fill;
     this.listBoxLog.FormattingEnabled = true;
     this.listBoxLog.ItemHeight = 16;
     this.listBoxLog.Location = new System.Drawing.Point(0, 0);
     this.listBoxLog.Name = "listBoxLog";
     this.listBoxLog.Size = new System.Drawing.Size(368, 257);
     this.listBoxLog.TabIndex = 0;
     //
     // FormLog
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(368, 257);
     this.Controls.Add(this.listBoxLog);
     this.Name = "FormLog";
     this.Text = "Результаты поиска";
     this.ResumeLayout(false);
 }
示例#14
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            var retval = false;

            try
            {
                edSvc = (System.Windows.Forms.Design.IWindowsFormsEditorService)provider.GetService(typeof(System.Windows.Forms.Design.IWindowsFormsEditorService));

                var column = (ColumnBase)context.Instance;
                retval = column.AllowNull;

                //Create the list box
                var newBox = new System.Windows.Forms.ListBox();
                newBox.Click         += new EventHandler(newBox_Click);
                newBox.IntegralHeight = false;

                var values = new List <string>();
                values.Add(false.ToString());
                values.Add(true.ToString());

                newBox.Items.AddRange(values.ToArray());
                newBox.SelectedIndex = (column.AllowNull ? 1 : 0);

                edSvc.DropDownControl(newBox);
                if ((column != null) && (newBox.SelectedIndex != -1))
                {
                    retval = (newBox.SelectedIndex == 0 ? false : true);
                }
            }
            catch (Exception ex) { }
            return(retval);
        }
示例#15
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.btnDelete = new System.Windows.Forms.Button();
     this.btnEdit = new System.Windows.Forms.Button();
     this.btnAdd = new System.Windows.Forms.Button();
     this.lbDetails = new System.Windows.Forms.ListBox();
     this.SuspendLayout();
     //
     // btnDelete
     //
     this.btnDelete.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
     this.btnDelete.Location = new System.Drawing.Point(374, 346);
     this.btnDelete.Name = "btnDelete";
     this.btnDelete.Size = new System.Drawing.Size(91, 23);
     this.btnDelete.TabIndex = 10;
     this.btnDelete.Text = "Delete";
     this.btnDelete.UseVisualStyleBackColor = true;
     //
     // btnEdit
     //
     this.btnEdit.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
     this.btnEdit.Location = new System.Drawing.Point(277, 346);
     this.btnEdit.Name = "btnEdit";
     this.btnEdit.Size = new System.Drawing.Size(91, 23);
     this.btnEdit.TabIndex = 9;
     this.btnEdit.Text = "Edit";
     this.btnEdit.UseVisualStyleBackColor = true;
     //
     // btnAdd
     //
     this.btnAdd.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
     this.btnAdd.Location = new System.Drawing.Point(180, 346);
     this.btnAdd.Name = "btnAdd";
     this.btnAdd.Size = new System.Drawing.Size(91, 23);
     this.btnAdd.TabIndex = 8;
     this.btnAdd.Text = "Add";
     this.btnAdd.UseVisualStyleBackColor = true;
     //
     // lbDetails
     //
     this.lbDetails.FormattingEnabled = true;
     this.lbDetails.Location = new System.Drawing.Point(12, 18);
     this.lbDetails.Name = "lbDetails";
     this.lbDetails.Size = new System.Drawing.Size(624, 316);
     this.lbDetails.TabIndex = 7;
     //
     // FormDetails
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(648, 372);
     this.Controls.Add(this.btnDelete);
     this.Controls.Add(this.btnEdit);
     this.Controls.Add(this.btnAdd);
     this.Controls.Add(this.lbDetails);
     this.MinimizeBox = false;
     this.Name = "FormDetails";
     this.Text = "FormDetails";
     this.ResumeLayout(false);
 }
示例#16
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            var retval = System.Data.SqlDbType.VarChar;

            try
            {
                edSvc = (System.Windows.Forms.Design.IWindowsFormsEditorService)provider.GetService(typeof(System.Windows.Forms.Design.IWindowsFormsEditorService));

                var column = (ColumnBase)context.Instance;
                retval = column.DataType;

                //Create the list box
                var newBox = new System.Windows.Forms.ListBox();
                newBox.Click         += new EventHandler(newBox_Click);
                newBox.IntegralHeight = false;

                var values = new List <string>();
                foreach (var t in Enum.GetNames(typeof(System.Data.SqlDbType)).OrderBy(x => x))
                {
                    values.Add(t);
                }

                newBox.Items.AddRange(values.ToArray());
                newBox.SelectedIndex = newBox.FindString(column.DataType.ToString());

                edSvc.DropDownControl(newBox);
                if ((column != null) && (newBox.SelectedIndex != -1))
                {
                    retval = (System.Data.SqlDbType)Enum.Parse(typeof(System.Data.SqlDbType), values[newBox.SelectedIndex]);
                }
            }
            catch (Exception ex) { }
            return(retval);
        }
示例#17
0
        private static void AddItem(this System.Windows.Forms.ListBox lstControl, string value)
#endif
        {
            int newIndex = lstControl.Items.Add(value);

            _dictionaryOfNewIndexes[lstControl.GetHashCode()] = newIndex;
        }
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            Reference retval = null;

            try
            {
                edSvc = (System.Windows.Forms.Design.IWindowsFormsEditorService)provider.GetService(typeof(System.Windows.Forms.Design.IWindowsFormsEditorService));

                var table = (Table)context.Instance;
                var root  = (ModelRoot)table.Root;
                var referenceCollection = table.Columns;

                //Create the list box
                var newBox = new System.Windows.Forms.ListBox();
                newBox.Click         += new EventHandler(newBox_Click);
                newBox.IntegralHeight = false;

                newBox.Items.Add("(Not Set)");
                foreach (Reference reference in referenceCollection)
                {
                    var column = ((ModelRoot)reference.Root).Database.Columns.GetById(reference.Ref)[0];
                    newBox.Items.Add(column);
                }

                edSvc.DropDownControl(newBox);
                if ((newBox.SelectedIndex > 0) && (newBox.SelectedItem != null))
                {
                    retval = ((Column)newBox.SelectedItem).CreateRef();
                }
            }
            catch (Exception ex) { }
            return(retval);
        }
示例#19
0
		public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
		{
			var retval = System.Data.SqlDbType.VarChar;
			try
			{
				edSvc = (System.Windows.Forms.Design.IWindowsFormsEditorService)provider.GetService(typeof(System.Windows.Forms.Design.IWindowsFormsEditorService));

				var column = (ColumnBase)context.Instance;
				retval = column.DataType;

				//Create the list box
				var newBox = new System.Windows.Forms.ListBox();
				newBox.Click += new EventHandler(newBox_Click);
				newBox.IntegralHeight = false;

				var values = new List<string>();
				foreach (var t in Enum.GetNames(typeof(System.Data.SqlDbType)).OrderBy(x => x))
				{
					values.Add(t);
				}

				newBox.Items.AddRange(values.ToArray());
				newBox.SelectedIndex = newBox.FindString(column.DataType.ToString());

				edSvc.DropDownControl(newBox);
				if ((column != null) && (newBox.SelectedIndex != -1))
					retval = (System.Data.SqlDbType)Enum.Parse(typeof(System.Data.SqlDbType), values[newBox.SelectedIndex]);

			}
			catch (Exception ex) { }
			return retval;
		}
 /// <summary>
 /// Erforderliche Methode für die Designerunterstützung.
 /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
 /// </summary>
 private void InitializeComponent()
 {
     this.listBox1 = new System.Windows.Forms.ListBox();
     this.SuspendLayout();
     //
     // listBox1
     //
     this.listBox1.BorderStyle           = System.Windows.Forms.BorderStyle.None;
     this.listBox1.Dock                  = System.Windows.Forms.DockStyle.Fill;
     this.listBox1.DrawMode              = System.Windows.Forms.DrawMode.OwnerDrawFixed;
     this.listBox1.IntegralHeight        = false;
     this.listBox1.ItemHeight            = 30;
     this.listBox1.Location              = new System.Drawing.Point(0, 0);
     this.listBox1.Name                  = "listBox1";
     this.listBox1.Size                  = new System.Drawing.Size(112, 152);
     this.listBox1.TabIndex              = 0;
     this.listBox1.DrawItem             += new System.Windows.Forms.DrawItemEventHandler(this.listBox1_DrawItem);
     this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
     //
     // Form_UITypeEditor_DashStyle
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(112, 152);
     this.Controls.Add(this.listBox1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Name            = "Form_UITypeEditor_DashStyle";
     this.Text            = "Form_UITypeEditor_DashStyle";
     this.ResumeLayout(false);
 }
示例#21
0
        public int Recognize(List <float> x, System.Windows.Forms.ListBox listBox)
        {
            listBox.Items.Add("Распознование:");
            int   index     = 0;
            float max_power = neurons[0].w[0];

            for (int i = 0; i < neurons.Count; i++)
            {
                for (int j = 0; j < neurons[i].w.Count; j++)
                {
                    neurons[i].power += neurons[i].w[j] * x[j];
                }

                //		listBox.Items.Add("index - [" + i + "] power - [" + neurons[i].power + "] position - [" + neurons[i].index + "]");
                if (neurons[i].power > max_power)
                {
                    max_power = neurons[i].power;
                    index     = i;
                }
            }


            listBox.Items.Add("Максимальный нейрон - index[" + index + "] power[" + max_power + "] position[" + neurons[index].index + "]");

            for (int i = 0; i < neurons.Count; i++)
            {
                neurons[i].power = 0;
            }

            return(neurons[index].index);
        }
示例#22
0
 public void izinVerilmisNotlarim(int ID, System.Windows.Forms.ListBox lbToAdd)
 {
     try
     {
         baglanti.Open();
         MySqlCommand cmd    = new MySqlCommand("SELECT * FROM defterler", baglanti);
         var          reader = cmd.ExecuteReader();
         while (reader.Read())
         {
             string json = "[]";
             if (reader.GetString("izin") != "")
             {
                 json = reader.GetString("izin");
             }
             dynamic array = JsonConvert.DeserializeObject(json);
             foreach (int item in array)
             {
                 if (item == ID)
                 {
                     lbToAdd.Items.Add(reader.GetString("ID") + " - " + reader.GetString("baslik"));
                     break;
                 }
             }
         }
         baglanti.Close();
     }
     catch (Exception e)
     {
     }
 }
示例#23
0
        public static void WriteToConsole()
        {
            InitTable();
            System.Windows.Forms.Form    f  = new System.Windows.Forms.Form();
            System.Windows.Forms.ListBox lb = new System.Windows.Forms.ListBox();
            f.Controls.Add(lb);
            lb.Dock = System.Windows.Forms.DockStyle.Fill;

            foreach (string k in streams.Keys)
            {
                StreamItem si  = streams[k] as StreamItem;
                string     add = k;
                if (si != null)
                {
                    add += " [" + si.StreamState + "]";
                }
                if (IsLocked(k, false))
                {
                    add = "[locked] " + add;
                }
                else if (IsLocked(k, true))
                {
                    add = "[ftlocked] " + add;
                }
                if (PackageMaintainer.Maintainer.Contains(k))
                {
                    add += "[managed]";
                }
                lb.Items.Add(add);
            }

            lb.Sorted = true;
            f.ShowDialog();
            f.Dispose();
        }
示例#24
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            var retval = Guid.Empty;

            try
            {
                edSvc = (System.Windows.Forms.Design.IWindowsFormsEditorService)provider.GetService(typeof(System.Windows.Forms.Design.IWindowsFormsEditorService));

                var indexColumn = context.Instance as IndexColumn;
                var field       = indexColumn.Index.Entity.Fields.FirstOrDefault(x => x.Id == indexColumn.FieldID);
                var fieldList   = indexColumn.Index.Entity.Fields.OrderBy(x => x.Name).ToList();

                //Create the list box
                var newBox = new System.Windows.Forms.ListBox();
                newBox.Click         += new EventHandler(newBox_Click);
                newBox.IntegralHeight = false;

                newBox.Items.AddRange(fieldList.Select(x => x.Name).ToArray());
                if (field != null)
                {
                    newBox.SelectedIndex = fieldList.IndexOf(field);
                }

                edSvc.DropDownControl(newBox);
                if ((indexColumn != null) && (newBox.SelectedIndex != -1))
                {
                    retval = fieldList[newBox.SelectedIndex].Id;
                }
            }
            catch (Exception ex) { }
            return(retval);
        }
示例#25
0
		public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
		{
			var retval = Guid.Empty;
			try
			{
				edSvc = (System.Windows.Forms.Design.IWindowsFormsEditorService)provider.GetService(typeof(System.Windows.Forms.Design.IWindowsFormsEditorService));

				var moduleRule = context.Instance as ModuleRule;
				var modulelist = moduleRule.Module.nHydrateModel.Modules.OrderBy(x => x.Name).Where(x => x.Id != moduleRule.Module.Id).ToList();
				var selected = modulelist.FirstOrDefault(x=>x.Id == moduleRule.DependentModule); 

				//Create the list box
				var newBox = new System.Windows.Forms.ListBox();
				newBox.Click += new EventHandler(newBox_Click);
				newBox.IntegralHeight = false;

				var values = new List<string>();
				values.Add(false.ToString());
				values.Add(true.ToString());

				newBox.Items.AddRange(modulelist.Select(x => x.Name).ToArray());
				if (selected != null)
					newBox.SelectedIndex = modulelist.IndexOf(selected);

				edSvc.DropDownControl(newBox);
				if ((moduleRule != null) && (newBox.SelectedIndex != -1))
					retval = modulelist[newBox.SelectedIndex].Id;

			}
			catch (Exception ex) { }
			return retval;
		}
示例#26
0
 public static void AddDefend(System.Windows.Forms.ListBox box, string defenseType, int defenseRoll = 0, int defenseBonus = 0)
 {
     //3d6  +   1  block 1d6  +   3
     //[0] [1] [2]  [3]  [4] [5] [6]
     for (int index = 0; index < box.Items.Count; index++)
     {
         string[] contents = box.Items[index].ToString().Split(' ');
         if (contents.Length < 4)
         {
             string item = box.Items[index].ToString();
             if (defenseType.ToLower().Contains(PASS.ToLower()) || defenseType.ToUpper().Contains(PASS.ToUpper()))
             {
                 item = item + " " + PASS;
             }
             else
             {
                 if (defenseType.ToLower().Contains(BLOCK.ToLower()) || defenseType.ToUpper().Contains(BLOCK.ToUpper()))
                 {
                     item = item + " " + BLOCK + " " + Convert.ToString(defenseRoll) + "d6 + " + Convert.ToString(defenseBonus);
                 }
                 else if (defenseType.ToLower().Contains(DODGE.ToLower()) || defenseType.ToUpper().Contains(DODGE.ToUpper()))
                 {
                     item = item + " " + DODGE + " " + Convert.ToString(defenseRoll) + "d6 + " + Convert.ToString(defenseBonus);
                 }
             }
             box.Items.RemoveAt(index);
             box.Items.Insert(index, item);
             return;
         }
     }
 }
示例#27
0
        /// <summary>
        /// Occurs when this command is clicked
        /// </summary>
        public override void OnClick()
        {
            //This command is designed to be on a context menu displayed when the
            //logging window is right-clicked. Get the context item of the application
            IDocument doc         = m_application.Document;
            object    contextItem = null;

            if (doc is IBasicDocument)
            {
                contextItem = ((IBasicDocument)doc).ContextItem;
            }

            IDockableWindow dockWin     = null;
            UID             logWindowID = new UIDClass();

            logWindowID.Value = "{600cb3c8-e9d8-4c20-b2c7-f97082b10f92}";

            if (contextItem != null && contextItem is IDockableWindow)
            {
                dockWin = (IDockableWindow)contextItem;
            }
            else //In the case of ArcCatalog or the command has been placed outside the designated context menu
            {
                //Get the dockable window directly
                IDockableWindowManager dockWindowManager = (IDockableWindowManager)m_application;
                dockWin = dockWindowManager.GetDockableWindow(logWindowID);
            }

            //Clear list items in the dockable window
            if (dockWin != null && dockWin.ID.Compare(logWindowID))
            {
                System.Windows.Forms.ListBox containedBox = dockWin.UserData as System.Windows.Forms.ListBox;
                containedBox.Items.Clear();
            }
        }
示例#28
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.lbContacts = new System.Windows.Forms.ListBox();
            this.label1 = new System.Windows.Forms.Label();
            this.btnStartChat = new System.Windows.Forms.Button();
            this.chatCheckTimer = new System.Windows.Forms.Timer(this.components);
            this.SuspendLayout();
            // 
            // lbContacts
            // 
            this.lbContacts.FormattingEnabled = true;
            this.lbContacts.Location = new System.Drawing.Point(12, 25);
            this.lbContacts.Name = "lbContacts";
            this.lbContacts.Size = new System.Drawing.Size(207, 290);
            this.lbContacts.TabIndex = 0;
            this.lbContacts.SelectedIndexChanged += new System.EventHandler(this.lbContacts_SelectedIndexChanged);
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(12, 9);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(49, 13);
            this.label1.TabIndex = 1;
            this.label1.Text = "Contacts";
            // 
            // btnStartChat
            // 
            this.btnStartChat.Location = new System.Drawing.Point(225, 25);
            this.btnStartChat.Name = "btnStartChat";
            this.btnStartChat.Size = new System.Drawing.Size(106, 23);
            this.btnStartChat.TabIndex = 2;
            this.btnStartChat.Text = "Start Chat";
            this.btnStartChat.UseVisualStyleBackColor = true;
            this.btnStartChat.Click += new System.EventHandler(this.btnStartChat_Click);
            // 
            // chatCheckTimer
            // 
            this.chatCheckTimer.Enabled = true;
            this.chatCheckTimer.Interval = 2000;
            this.chatCheckTimer.Tick += new System.EventHandler(this.chatCheckTimer_Tick);
            // 
            // HoofdForm
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(340, 327);
            this.Controls.Add(this.btnStartChat);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.lbContacts);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.MaximizeBox = false;
            this.Name = "HoofdForm";
            this.Text = "HoofdForm";
            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.HoofdForm_FormClosing);
            this.ResumeLayout(false);
            this.PerformLayout();

        }
        private void HandlePluginLaunch(object sender, EventArgs e)
        {
            //NWN2Toolset.NWN2.Data.Blueprints.NWN2GlobalBlueprintManager bpManager = new NWN2Toolset.NWN2.Data.Blueprints.NWN2GlobalBlueprintManager();
            //bpManager.Initialize();
            NWN2Toolset.NWN2.Data.TypedCollections.NWN2BlueprintCollection items = NWN2Toolset.NWN2.Data.Blueprints.NWN2GlobalBlueprintManager.GetBlueprintsOfType(NWN2Toolset.NWN2.Data.Templates.NWN2ObjectType.Item);
            ALFAItemBlueprint scroll;
            
            System.Windows.Forms.Form form = new System.Windows.Forms.Form();
            /*System.Windows.Forms.TextBox text = new System.Windows.Forms.TextBox();
            text.Size = new System.Drawing.Size(400, 300);
            text.Multiline = true;
            text.WordWrap = false;
            text.AcceptsReturn = true;
            text.AcceptsTab = true;
            text.ScrollBars = System.Windows.Forms.ScrollBars.Both;
            text.Text = scroll.ToString();*/
            System.Windows.Forms.ListBox listBox = new System.Windows.Forms.ListBox();
            listBox.Sorted = true;
            listBox.HorizontalScrollbar = true;
            listBox.Size = new System.Drawing.Size(400, 300);

            form.Controls.Add(listBox);
            form.Size = new System.Drawing.Size(430, 330);
            form.Show();    

            //items.Add(scroll.ItemBlueprint);
            //scroll.TemplateResRef = "TEST RESREF";
            //scroll.AddItemProperty(ALFAItemProperty.CastSpell1ChargeItemProperty(0));
            //scroll.AddItemProperty(ALFAItemProperty.WizardOnlyItemProperty());            
            //items.Add(scroll.ItemBlueprint);

            ConsumableCreator cc = new ConsumableCreator();
            cc.Run();
        }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.lstProducts = new System.Windows.Forms.ListBox();
     this.btnExit = new System.Windows.Forms.Button();
     this.btnDelete = new System.Windows.Forms.Button();
     this.btnAdd = new System.Windows.Forms.Button();
     this.SuspendLayout();
     //
     // lstProducts
     //
     this.lstProducts.FormattingEnabled = true;
     this.lstProducts.Location = new System.Drawing.Point(12, 12);
     this.lstProducts.Name = "lstProducts";
     this.lstProducts.Size = new System.Drawing.Size(352, 160);
     this.lstProducts.TabIndex = 10;
     //
     // btnExit
     //
     this.btnExit.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     this.btnExit.Location = new System.Drawing.Point(380, 76);
     this.btnExit.Name = "btnExit";
     this.btnExit.Size = new System.Drawing.Size(104, 24);
     this.btnExit.TabIndex = 9;
     this.btnExit.Text = "E&xit";
     this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
     //
     // btnDelete
     //
     this.btnDelete.Location = new System.Drawing.Point(380, 44);
     this.btnDelete.Name = "btnDelete";
     this.btnDelete.Size = new System.Drawing.Size(104, 24);
     this.btnDelete.TabIndex = 8;
     this.btnDelete.Text = "Delete Product...";
     this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
     //
     // btnAdd
     //
     this.btnAdd.Location = new System.Drawing.Point(380, 12);
     this.btnAdd.Name = "btnAdd";
     this.btnAdd.Size = new System.Drawing.Size(104, 24);
     this.btnAdd.TabIndex = 7;
     this.btnAdd.Text = "Add Product...";
     this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
     //
     // frmProductMain
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.CancelButton = this.btnExit;
     this.ClientSize = new System.Drawing.Size(502, 181);
     this.Controls.Add(this.lstProducts);
     this.Controls.Add(this.btnExit);
     this.Controls.Add(this.btnDelete);
     this.Controls.Add(this.btnAdd);
     this.Name = "frmProductMain";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text = "Product Maintenance";
     this.Load += new System.EventHandler(this.frmProductMain_Load);
     this.ResumeLayout(false);
 }
示例#31
0
        public void LoadTextBox(System.Windows.Forms.ListBox Dest, string Source)
        {
            int  StartPos;
            int  Endpos;
            bool Done;

            StartPos = 0;
            Done     = false;
            Dest.Items.Clear();
            while (!Done)
            {
                if (StartPos >= Source.Length)
                {
                    Done = true;
                }
                else
                {
                    Endpos = Source.IndexOf("\r", StartPos);
                    if (Endpos >= 0)
                    {
                        Dest.Items.Add(Source.Substring(StartPos, Endpos - StartPos));
                        StartPos = Endpos + 2;                         // skip CR/LF
                    }
                    else
                    {
                        Done = true;
                    }
                }
            }
        }
 /// <summary>
 /// Overrides the method used to provide basic behaviour for selecting editor.
 /// Shows our custom control for editing the value.
 /// </summary>
 /// <param name="context">The context of the editing control</param>
 /// <param name="provider">A valid service provider</param>
 /// <param name="value">The current value of the object to edit</param>
 /// <returns>The new value of the object</returns>
 public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     if (context == null || context.Instance == null || provider == null)
     {
         return base.EditValue(context, provider, value);
     }
     if ((m_EdSvc = (System.Windows.Forms.Design.IWindowsFormsEditorService)provider.GetService(typeof(System.Windows.Forms.Design.IWindowsFormsEditorService))) == null)
     {
         return value;
     }
     // Create a CheckedListBox and populate it with all the propertylist values
     m_List = new System.Windows.Forms.ListBox();
     m_List.BorderStyle = System.Windows.Forms.BorderStyle.None;
     foreach (GXCategory cat in (context.Instance as GXKeepalive).Parent.Categories)
     {
         foreach (GXProperty prop in cat.Properties)
         {
             m_List.Items.Add(prop);
         }
     }
     if (value != null)
     {
         m_List.SelectedIndex = m_List.Items.IndexOf(value);
     }
     m_List.SelectedIndexChanged += new System.EventHandler(this.OnSelectedIndexChanged);
     // Show Listbox as a DropDownControl. This methods returns only when the dropdowncontrol is closed
     m_EdSvc.DropDownControl(m_List);
     (context.Instance as GXKeepalive).Target = m_List.SelectedItem;
     return value;
 }
示例#33
0
        /// <summary>
        /// Populate a list box using the keys in this dictionary
        /// </summary>
        /// <param name="listBox">The list box to be populated</param>
        public void PopulateListBox(System.Windows.Forms.ListBox listBox)
        {
            object o = listBox.SelectedItem;

            listBox.Items.Clear();

            foreach (KeyValuePair <string, string> kvp in this)
            {
                listBox.Items.Add(kvp.Key);
            }

            if (listBox.Items.Count > 0)
            {
                if (o == null)
                {
                    listBox.SelectedIndex = 0;
                }
                else if (listBox.Items.Contains(o))
                {
                    listBox.SelectedItem = o;
                }
                else
                {
                    listBox.SelectedIndex = 0;
                }
            }
        }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
     this.listBox1 = new System.Windows.Forms.ListBox();
     this.SuspendLayout();
     //
     // listBox1
     //
     this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
     this.listBox1.FormattingEnabled = true;
     this.listBox1.ItemHeight = 16;
     this.listBox1.Location = new System.Drawing.Point(1, 0);
     this.listBox1.Name = "listBox1";
     this.listBox1.Size = new System.Drawing.Size(284, 256);
     this.listBox1.TabIndex = 0;
     //
     // Form1
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(282, 253);
     this.Controls.Add(this.listBox1);
     this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.Name = "Form1";
     this.Opacity = 0.01D;
     this.ShowInTaskbar = false;
     this.Text = "VitratF";
     this.ResumeLayout(false);
 }
示例#35
0
 /// <summary>
 /// This method is required for Windows Forms designer support.
 /// Do not change the method contents inside the source code editor. The Forms designer might
 /// not be able to load this method if it was changed manually.
 /// </summary>
 private void InitializeComponent()
 {
     this.CompletionListBox = new System.Windows.Forms.ListBox();
     this.SuspendLayout();
     //
     // CompletionListBox
     //
     this.CompletionListBox.Dock = System.Windows.Forms.DockStyle.Fill;
     this.CompletionListBox.FormattingEnabled = true;
     this.CompletionListBox.Location          = new System.Drawing.Point(0, 0);
     this.CompletionListBox.Name                  = "CompletionListBox";
     this.CompletionListBox.Size                  = new System.Drawing.Size(399, 309);
     this.CompletionListBox.TabIndex              = 0;
     this.CompletionListBox.SelectedIndexChanged += new System.EventHandler(this.CompletionListBoxSelectedIndexChanged);
     this.CompletionListBox.DoubleClick          += new System.EventHandler(this.CompletionListBoxDoubleClick);
     this.CompletionListBox.KeyDown              += new System.Windows.Forms.KeyEventHandler(this.CompletionListBoxKeyDown);
     //
     // AutoCompletionBox
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.Controls.Add(this.CompletionListBox);
     this.Name = "AutoCompletionBox";
     this.Size = new System.Drawing.Size(399, 309);
     this.ResumeLayout(false);
 }
示例#36
0
 /// <summary>
 /// This method is required for Windows Forms designer support.
 /// Do not change the method contents inside the source code editor. The Forms designer might
 /// not be able to load this method if it was changed manually.
 /// </summary>
 private void InitializeComponent()
 {
     this.listBox1 = new System.Windows.Forms.ListBox();
     this.SuspendLayout();
     //
     // listBox1
     //
     this.listBox1.BackColor         = System.Drawing.Color.OldLace;
     this.listBox1.FormattingEnabled = true;
     this.listBox1.Location          = new System.Drawing.Point(53, 23);
     this.listBox1.Name     = "listBox1";
     this.listBox1.Size     = new System.Drawing.Size(157, 186);
     this.listBox1.TabIndex = 0;
     //
     // MainForm
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.BackColor           = System.Drawing.Color.LightCoral;
     this.ClientSize          = new System.Drawing.Size(284, 261);
     this.Controls.Add(this.listBox1);
     this.Name = "MainForm";
     this.Text = "nomeSenha";
     this.ResumeLayout(false);
 }
示例#37
0
 /// <summary>
 /// 设计器支持所需的方法 - 不要
 /// 使用代码编辑器修改此方法的内容。
 /// </summary>
 private void InitializeComponent()
 {
     this.listBox1 = new System.Windows.Forms.ListBox();
     this.SuspendLayout();
     //
     // listBox1
     //
     this.listBox1.FormattingEnabled = true;
     this.listBox1.ItemHeight = 12;
     this.listBox1.Location = new System.Drawing.Point(0, 3);
     this.listBox1.Name = "listBox1";
     this.listBox1.Size = new System.Drawing.Size(282, 88);
     this.listBox1.TabIndex = 0;
     //
     // Frm_Main
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(284, 93);
     this.Controls.Add(this.listBox1);
     this.Name = "Frm_Main";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text = "C#中实现文件拖放";
     this.Load += new System.EventHandler(this.Form1_Load);
     this.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form1_DragEnter);
     this.ResumeLayout(false);
 }
示例#38
0
        //--------------------------------------------------------------------------------------------------------------
        // ListBox

        public static void RefreshItems(this System.Windows.Forms.ListBox list)
        {
            typeof(System.Windows.Forms.ListBox).InvokeMember("RefreshItems",
                                                              System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.InvokeMethod,
                                                              null, list, new object[] { }
                                                              );
        }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.listBox1 = new System.Windows.Forms.ListBox();
     this.SuspendLayout();
     //
     // listBox1
     //
     this.listBox1.FormattingEnabled = true;
     this.listBox1.Items.AddRange(new object[] {
     "Bệnh viện 30/4",
     "Bệnh viện 115",
     "Bệnh viện Thống Nhất"});
     this.listBox1.Location = new System.Drawing.Point(22, 44);
     this.listBox1.Name = "listBox1";
     this.listBox1.Size = new System.Drawing.Size(352, 173);
     this.listBox1.TabIndex = 0;
     this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
     //
     // Form1
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(400, 262);
     this.Controls.Add(this.listBox1);
     this.Name = "Form1";
     this.Text = "Đặt lịch khám";
     this.Load += new System.EventHandler(this.Form1_Load);
     this.ResumeLayout(false);
 }
示例#40
0
		public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
		{
			var retval = false;
			try
			{
				edSvc = (System.Windows.Forms.Design.IWindowsFormsEditorService)provider.GetService(typeof(System.Windows.Forms.Design.IWindowsFormsEditorService));

				var column = (ColumnBase)context.Instance;
				retval = column.AllowNull;

				//Create the list box
				var newBox = new System.Windows.Forms.ListBox();
				newBox.Click += new EventHandler(newBox_Click);
				newBox.IntegralHeight = false;

				var values = new List<string>();
				values.Add(false.ToString()); 
				values.Add(true.ToString());

				newBox.Items.AddRange(values.ToArray());
				newBox.SelectedIndex = (column.AllowNull ? 1 : 0);

				edSvc.DropDownControl(newBox);
				if ((column != null) && (newBox.SelectedIndex != -1))
					retval = (newBox.SelectedIndex == 0 ? false : true);

			}
			catch (Exception ex) { }
			return retval;
		}
示例#41
0
        /// <summary>
        /// Overrides the method used to provide basic behaviour for selecting editor.
        /// Shows our custom control for editing the value.
        /// </summary>
        /// <param name="context">The context of the editing control</param>
        /// <param name="provider">A valid service provider</param>
        /// <param name="value">The current value of the object to edit</param>
        /// <returns>The new value of the object</returns>
        public override object EditValue(ITypeDescriptorContext context,
                                         IServiceProvider provider, object value)
        {
            if (context != null && context.Instance != null && provider != null)
            {
                edSvc = (System.Windows.Forms.Design.IWindowsFormsEditorService)
                        provider.GetService(typeof(System.Windows.Forms.Design.IWindowsFormsEditorService));
                if (edSvc != null)
                {
                    lb                       = new System.Windows.Forms.ListBox();
                    lb.BorderStyle           = System.Windows.Forms.BorderStyle.None;
                    lb.SelectedIndexChanged += new EventHandler(lb_SelectedIndexChanged);
                    lb.Items.Add("onclick");
                    lb.Items.Add("ondblclick");
                    lb.Items.Add("onmouseover");
                    lb.Items.Add("onfocus");
                    lb.Items.Add("oncontextmenu");
                    edSvc.DropDownControl(lb);
                    if (lb.SelectedIndex == -1)
                    {
                        return(value);
                    }
                    return(lb.SelectedItem);
                }
            }

            return(value);
        }
示例#42
0
        private string[,] EstablecerCandidatosSinEliminados(System.Windows.Forms.ListBox candidatosFinal, int f, int c, string[,] valorCandidatoSinEliminados)
        {
            if (candidatosFinal.Items.Count > 0)
            {
                string valor = string.Empty; int indic = 1;
                foreach (String v in candidatosFinal.Items)
                {
                    String I = v.Trim();
                    if (indic == 3 || indic == 6 || indic == 9)
                    {
                        valor = valor + " " + I + Environment.NewLine;
                    }
                    else
                    {
                        valor = valor + " " + I;
                    }
                    indic++;
                }
                valorCandidatoSinEliminados[f, c] = valor;
            }
            else
            {
                valorCandidatoSinEliminados[f, c] = string.Empty;
            }

            return(valorCandidatoSinEliminados);
        }
示例#43
0
        internal System.Data.DataTable Buscar(System.Windows.Forms.ListBox regimenesActuales)
        {
            ConexionSQL c     = new ConexionSQL();
            string      query = "select descripcion from WHERE_EN_EL_DELETE_FROM.regimenes";

            if (regimenesActuales.Items.Count.Equals(0))
            {
            }
            else
            {
                query += " where ";
                int size = regimenesActuales.Items.Count;
                int i    = 0;
                foreach (var item in regimenesActuales.Items)
                {
                    query += " descripcion not like '" + item.ToString() + "'";
                    i++;
                    if (i.Equals(size))
                    {
                    }
                    else
                    {
                        query += " and ";
                    }
                }
            }
            DataTable regimenesEncontrados = c.cargarTablaSQL(query);

            return(regimenesEncontrados);
        }
示例#44
0
        private System.Windows.Forms.ListBox OrganizarCandidatos(System.Windows.Forms.ListBox lista, string candidatosFC)
        {
            string[] item = new string [18];
            System.Windows.Forms.ListBox listaAux = new System.Windows.Forms.ListBox();
            if (candidatosFC != null)
            {
                candidatosFC = candidatosFC.Trim();
                item         = candidatosFC.Split(' ');
            }

            for (int i = 0; i <= item.Length - 1; i++)
            {
                if (item[i] != null && item[i] != string.Empty)
                {
                    listaAux.Items.Add(item[i].Trim());
                }
            }
            foreach (string n in listaAux.Items)
            {
                if (n.Trim().Length == 1)
                {
                    lista.Items.Add(n.Trim());
                }
                if (n.Trim().Length > 1)
                {
                    lista.Items.Add(n.Substring(0, 1));
                    lista.Items.Add(n.Substring(2, 2));
                }
            }
            return(lista);
        }
示例#45
0
 public static void SelectAll(this System.Windows.Forms.ListBox myListBox)
 {
     for (int i = 0; i < myListBox.Items.Count; i++)
     {
         myListBox.SetSelected(i, true);
     }
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.listBox1 = new System.Windows.Forms.ListBox();
     this.SuspendLayout();
     //
     // listBox1
     //
     this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.listBox1.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.listBox1.FormattingEnabled = true;
     this.listBox1.ItemHeight = 14;
     this.listBox1.Location = new System.Drawing.Point(0, 0);
     this.listBox1.Name = "listBox1";
     this.listBox1.Size = new System.Drawing.Size(216, 158);
     this.listBox1.TabIndex = 0;
     //
     // StackFrameView
     //
     this.ClientSize = new System.Drawing.Size(219, 161);
     this.CloseButton = false;
     this.CloseButtonVisible = false;
     this.Controls.Add(this.listBox1);
     this.HideOnClose = true;
     this.MaximizeBox = false;
     this.MinimizeBox = false;
     this.MinimumSize = new System.Drawing.Size(235, 200);
     this.Name = "StackFrameView";
     this.Padding = new System.Windows.Forms.Padding(0, 2, 0, 2);
     this.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.DockLeft;
     this.TabText = "Stack Frame";
     this.Text = "Stack Frame";
     this.ResumeLayout(false);
 }
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            var retval = Guid.Empty;
            try
            {
                edSvc = (System.Windows.Forms.Design.IWindowsFormsEditorService)provider.GetService(typeof(System.Windows.Forms.Design.IWindowsFormsEditorService));

                var indexColumn = context.Instance as IndexColumn;
                var field = indexColumn.Index.Entity.Fields.FirstOrDefault(x => x.Id == indexColumn.FieldID);
                var fieldList = indexColumn.Index.Entity.Fields.OrderBy(x => x.Name).ToList();

                //Create the list box
                var newBox = new System.Windows.Forms.ListBox();
                newBox.Click += new EventHandler(newBox_Click);
                newBox.IntegralHeight = false;

                newBox.Items.AddRange(fieldList.Select(x => x.Name).ToArray());
                if (field != null)
                    newBox.SelectedIndex = fieldList.IndexOf(field);

                edSvc.DropDownControl(newBox);
                if ((indexColumn != null) && (newBox.SelectedIndex != -1))
                    retval = fieldList[newBox.SelectedIndex].Id;

            }
            catch (Exception ex) { }
            return retval;
        }
示例#48
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.butOK = new OpenDental.UI.Button();
     this.butCancel = new OpenDental.UI.Button();
     this.listUser = new System.Windows.Forms.ListBox();
     this.SuspendLayout();
     //
     // butOK
     //
     this.butOK.AdjustImageLocation = new System.Drawing.Point(0,0);
     this.butOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.butOK.Autosize = true;
     this.butOK.BtnShape = OpenDental.UI.enumType.BtnShape.Rectangle;
     this.butOK.BtnStyle = OpenDental.UI.enumType.XPStyle.Silver;
     this.butOK.CornerRadius = 4F;
     this.butOK.Location = new System.Drawing.Point(215,451);
     this.butOK.Name = "butOK";
     this.butOK.Size = new System.Drawing.Size(75,24);
     this.butOK.TabIndex = 3;
     this.butOK.Text = "&OK";
     this.butOK.Click += new System.EventHandler(this.butOK_Click);
     //
     // butCancel
     //
     this.butCancel.AdjustImageLocation = new System.Drawing.Point(0,0);
     this.butCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.butCancel.Autosize = true;
     this.butCancel.BtnShape = OpenDental.UI.enumType.BtnShape.Rectangle;
     this.butCancel.BtnStyle = OpenDental.UI.enumType.XPStyle.Silver;
     this.butCancel.CornerRadius = 4F;
     this.butCancel.Location = new System.Drawing.Point(215,492);
     this.butCancel.Name = "butCancel";
     this.butCancel.Size = new System.Drawing.Size(75,24);
     this.butCancel.TabIndex = 2;
     this.butCancel.Text = "&Cancel";
     this.butCancel.Click += new System.EventHandler(this.butCancel_Click);
     //
     // listUser
     //
     this.listUser.FormattingEnabled = true;
     this.listUser.Location = new System.Drawing.Point(12,18);
     this.listUser.Name = "listUser";
     this.listUser.Size = new System.Drawing.Size(176,498);
     this.listUser.TabIndex = 4;
     this.listUser.DoubleClick += new System.EventHandler(this.listUser_DoubleClick);
     //
     // FormUserPick
     //
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
     this.ClientSize = new System.Drawing.Size(316,534);
     this.Controls.Add(this.listUser);
     this.Controls.Add(this.butOK);
     this.Controls.Add(this.butCancel);
     this.Name = "FormUserPick";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text = "Pick User";
     this.Load += new System.EventHandler(this.FormUserPick_Load);
     this.ResumeLayout(false);
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.splitContainer1 = new System.Windows.Forms.SplitContainer();
       this.listBox1 = new System.Windows.Forms.ListBox();
       this.tv = new System.Windows.Forms.TreeView();
       this.splitContainer1.Panel1.SuspendLayout();
       this.splitContainer1.Panel2.SuspendLayout();
       this.splitContainer1.SuspendLayout();
       this.SuspendLayout();
       //
       // splitContainer1
       //
       this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
       this.splitContainer1.Location = new System.Drawing.Point( 0, 0 );
       this.splitContainer1.Name = "splitContainer1";
       //
       // splitContainer1.Panel1
       //
       this.splitContainer1.Panel1.Controls.Add( this.listBox1 );
       //
       // splitContainer1.Panel2
       //
       this.splitContainer1.Panel2.Controls.Add( this.tv );
       this.splitContainer1.Size = new System.Drawing.Size( 459, 556 );
       this.splitContainer1.SplitterDistance = 153;
       this.splitContainer1.TabIndex = 0;
       //
       // listBox1
       //
       this.listBox1.Dock = System.Windows.Forms.DockStyle.Fill;
       this.listBox1.FormattingEnabled = true;
       this.listBox1.Location = new System.Drawing.Point( 0, 0 );
       this.listBox1.Name = "listBox1";
       this.listBox1.Size = new System.Drawing.Size( 153, 550 );
       this.listBox1.Sorted = true;
       this.listBox1.TabIndex = 0;
       this.listBox1.SelectedIndexChanged += new System.EventHandler( this.listBox1_SelectedIndexChanged );
       //
       // tv
       //
       this.tv.Dock = System.Windows.Forms.DockStyle.Fill;
       this.tv.Location = new System.Drawing.Point( 0, 0 );
       this.tv.Name = "tv";
       this.tv.Size = new System.Drawing.Size( 302, 556 );
       this.tv.TabIndex = 0;
       //
       // CmdInspectElectricalForm2
       //
       this.AutoScaleDimensions = new System.Drawing.SizeF( 6F, 13F );
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
       this.ClientSize = new System.Drawing.Size( 459, 556 );
       this.Controls.Add( this.splitContainer1 );
       this.Name = "CmdInspectElectricalForm2";
       this.Text = "Electrical System Inspector";
       this.splitContainer1.Panel1.ResumeLayout( false );
       this.splitContainer1.Panel2.ResumeLayout( false );
       this.splitContainer1.ResumeLayout( false );
       this.ResumeLayout( false );
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.patientNameList = new System.Windows.Forms.ListBox();
     this.addButton = new System.Windows.Forms.Button();
     this.deleteButton = new System.Windows.Forms.Button();
     this.selectButton = new System.Windows.Forms.Button();
     this.SuspendLayout();
     //
     // patientNameList
     //
     this.patientNameList.FormattingEnabled = true;
     this.patientNameList.Location = new System.Drawing.Point(12, 12);
     this.patientNameList.Name = "patientNameList";
     this.patientNameList.Size = new System.Drawing.Size(211, 238);
     this.patientNameList.TabIndex = 0;
     //
     // addButton
     //
     this.addButton.Location = new System.Drawing.Point(285, 12);
     this.addButton.Name = "addButton";
     this.addButton.Size = new System.Drawing.Size(88, 23);
     this.addButton.TabIndex = 1;
     this.addButton.Text = "Add Patient";
     this.addButton.UseVisualStyleBackColor = true;
     this.addButton.Click += new System.EventHandler(this.addButton_Click);
     //
     // deleteButton
     //
     this.deleteButton.Location = new System.Drawing.Point(285, 41);
     this.deleteButton.Name = "deleteButton";
     this.deleteButton.Size = new System.Drawing.Size(88, 23);
     this.deleteButton.TabIndex = 2;
     this.deleteButton.Text = "Delete Patient";
     this.deleteButton.UseVisualStyleBackColor = true;
     this.deleteButton.Click += new System.EventHandler(this.deleteButton_Click);
     //
     // selectButton
     //
     this.selectButton.Location = new System.Drawing.Point(285, 228);
     this.selectButton.Name = "selectButton";
     this.selectButton.Size = new System.Drawing.Size(88, 23);
     this.selectButton.TabIndex = 3;
     this.selectButton.Text = "Select Patient";
     this.selectButton.UseVisualStyleBackColor = true;
     this.selectButton.Click += new System.EventHandler(this.selectButton_Click);
     //
     // PatientDatabase
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(385, 262);
     this.Controls.Add(this.selectButton);
     this.Controls.Add(this.deleteButton);
     this.Controls.Add(this.addButton);
     this.Controls.Add(this.patientNameList);
     this.Name = "PatientDatabase";
     this.Text = "Patient Database";
     this.ResumeLayout(false);
 }
		private void InitializeComponent()
		{
			lstUsers = new System.Windows.Forms.ListBox ();
			lstUsers.Dock = System.Windows.Forms.DockStyle.Fill;

			this.Text = "Main";
			this.Controls.Add (lstUsers);
		}
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.textBox1 = new System.Windows.Forms.TextBox();
     this.button1 = new System.Windows.Forms.Button();
     this.listBox1 = new System.Windows.Forms.ListBox();
     this.button2 = new System.Windows.Forms.Button();
     this.SuspendLayout();
     //
     // textBox1
     //
     this.textBox1.Location = new System.Drawing.Point(12, 29);
     this.textBox1.Name = "textBox1";
     this.textBox1.Size = new System.Drawing.Size(220, 20);
     this.textBox1.TabIndex = 0;
     //
     // button1
     //
     this.button1.Location = new System.Drawing.Point(238, 26);
     this.button1.Name = "button1";
     this.button1.Size = new System.Drawing.Size(72, 23);
     this.button1.TabIndex = 1;
     this.button1.Text = "button1";
     this.button1.UseVisualStyleBackColor = true;
     this.button1.Click += new System.EventHandler(this.button1_Click);
     //
     // listBox1
     //
     this.listBox1.FormattingEnabled = true;
     this.listBox1.Location = new System.Drawing.Point(12, 55);
     this.listBox1.Name = "listBox1";
     this.listBox1.Size = new System.Drawing.Size(353, 95);
     this.listBox1.TabIndex = 2;
     //
     // button2
     //
     this.button2.Location = new System.Drawing.Point(248, 178);
     this.button2.Name = "button2";
     this.button2.Size = new System.Drawing.Size(75, 23);
     this.button2.TabIndex = 3;
     this.button2.Text = "button2";
     this.button2.UseVisualStyleBackColor = true;
     this.button2.Click += new System.EventHandler(this.button2_Click);
     //
     // Form1
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(377, 273);
     this.Controls.Add(this.button2);
     this.Controls.Add(this.listBox1);
     this.Controls.Add(this.button1);
     this.Controls.Add(this.textBox1);
     this.Name = "Form1";
     this.Text = "Form1";
     this.Load += new System.EventHandler(this.Form1_Load);
     this.ResumeLayout(false);
     this.PerformLayout();
 }
示例#53
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.serverBox = new System.Windows.Forms.ListBox();
     this.joinButton = new System.Windows.Forms.Button();
     this.NameBox = new System.Windows.Forms.TextBox();
     this.label1 = new System.Windows.Forms.Label();
     this.SuspendLayout();
     //
     // serverBox
     //
     this.serverBox.FormattingEnabled = true;
     this.serverBox.Location = new System.Drawing.Point(11, 41);
     this.serverBox.Name = "serverBox";
     this.serverBox.Size = new System.Drawing.Size(313, 329);
     this.serverBox.TabIndex = 0;
     //
     // joinButton
     //
     this.joinButton.Location = new System.Drawing.Point(330, 41);
     this.joinButton.Name = "joinButton";
     this.joinButton.Size = new System.Drawing.Size(108, 50);
     this.joinButton.TabIndex = 1;
     this.joinButton.Text = "Join Server";
     this.joinButton.UseVisualStyleBackColor = true;
     this.joinButton.Click += new System.EventHandler(this.JoinButtonClick);
     //
     // NameBox
     //
     this.NameBox.Location = new System.Drawing.Point(133, 12);
     this.NameBox.Name = "NameBox";
     this.NameBox.Size = new System.Drawing.Size(191, 20);
     this.NameBox.TabIndex = 2;
     this.NameBox.Text = "Noname";
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Location = new System.Drawing.Point(89, 15);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(38, 13);
     this.label1.TabIndex = 3;
     this.label1.Text = "Name:";
     //
     // FindServer
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(453, 393);
     this.Controls.Add(this.label1);
     this.Controls.Add(this.NameBox);
     this.Controls.Add(this.joinButton);
     this.Controls.Add(this.serverBox);
     this.Name = "FindServer";
     this.Text = "TWO!";
     this.ResumeLayout(false);
     this.PerformLayout();
 }
示例#54
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.button1 = new System.Windows.Forms.Button();
            this.Input = new System.Windows.Forms.TextBox();
            Output = new System.Windows.Forms.ListBox();
            this.SuspendLayout();
            // 
            // button1
            // 
            this.button1.Location = new System.Drawing.Point(366, 426);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(106, 20);
            this.button1.TabIndex = 0;
            this.button1.Text = "Submit";
            this.button1.UseVisualStyleBackColor = true;
            this.button1.Click += new System.EventHandler(this.button1_Click);
            // 
            // Input
            // 
            this.Input.Location = new System.Drawing.Point(12, 426);
            this.Input.MaxLength = 1024;
            this.Input.Name = "Input";
            this.Input.Size = new System.Drawing.Size(348, 20);
            this.Input.TabIndex = 1;
            this.Input.KeyDown += new System.Windows.Forms.KeyEventHandler(this.keyPressed);
            // 
            // Output
            //
            Output.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            Output.FormattingEnabled = true;
            Output.ItemHeight = 16;
            Output.Location = new System.Drawing.Point(12, 12);
            Output.Name = "Output";
            Output.Size = new System.Drawing.Size(460, 404);
            Output.TabIndex = 2;
            Output.ForeColor = Color.Black;
            // 
            // ChatWindow
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(484, 461);
            this.Controls.Add(Output);
            this.Controls.Add(this.Input);
            this.Controls.Add(this.button1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "ChatWindow";
            this.Text = "Client";
            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ChatWindow_FormClosed);
            this.Load += new System.EventHandler(this.ChatWindow_Load);
            this.Paint += new System.Windows.Forms.PaintEventHandler(this.ChatWindow_Paint);
            this.ResumeLayout(false);
            this.PerformLayout();

        }
示例#55
0
 /// <summary>
 /// This method is required for Windows Forms designer support.
 /// Do not change the method contents inside the source code editor. The Forms designer might
 /// not be able to load this method if it was changed manually.
 /// </summary>
 private void InitializeComponent()
 {
     this._lChooseLang = new System.Windows.Forms.Label();
     this._ctlLangList = new System.Windows.Forms.ListBox();
     this._bOk = new System.Windows.Forms.Button();
     this.SuspendLayout();
     //
     // _lChooseLang
     //
     this._lChooseLang.Location = new System.Drawing.Point(14, 11);
     this._lChooseLang.Name = "_lChooseLang";
     this._lChooseLang.Size = new System.Drawing.Size(313, 54);
     this._lChooseLang.TabIndex = 0;
     this._lChooseLang.Text = "label1";
     //
     // _ctlLangList
     //
     this._ctlLangList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                             | System.Windows.Forms.AnchorStyles.Left)
                             | System.Windows.Forms.AnchorStyles.Right)));
     this._ctlLangList.FormattingEnabled = true;
     this._ctlLangList.ItemHeight = 16;
     this._ctlLangList.Location = new System.Drawing.Point(14, 68);
     this._ctlLangList.Name = "_ctlLangList";
     this._ctlLangList.Size = new System.Drawing.Size(313, 84);
     this._ctlLangList.TabIndex = 1;
     //
     // _bOk
     //
     this._bOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this._bOk.Location = new System.Drawing.Point(199, 168);
     this._bOk.Name = "_bOk";
     this._bOk.Size = new System.Drawing.Size(128, 32);
     this._bOk.TabIndex = 2;
     this._bOk.Text = "Ok";
     this._bOk.UseVisualStyleBackColor = true;
     this._bOk.Click += new System.EventHandler(this._bOkClick);
     //
     // CRSInitLang
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 16F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(341, 212);
     this.Controls.Add(this._bOk);
     this.Controls.Add(this._ctlLangList);
     this.Controls.Add(this._lChooseLang);
     this.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
     this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
     this.MaximizeBox = false;
     this.MinimizeBox = false;
     this.Name = "CRSInitLang";
     this.ShowIcon = false;
     this.Text = "ReportSmart";
     this.ResumeLayout(false);
 }
示例#56
0
		private void InitializeComponent()
		{
			lstUsers = new System.Windows.Forms.ListBox ();
			lstUsers.Dock = System.Windows.Forms.DockStyle.Fill;
			lstUsers.Enabled = false;
			lstUsers.MouseDoubleClick += LstUsers_MouseDoubleClick;

			this.Text = "Main";
			this.Controls.Add (lstUsers);
		}
示例#57
0
 public Logger(string _robot, string _dbversion, System.Windows.Forms.ListBox target)
 {
     filepath = @".\log\" + DateTime.Now.Year.ToString()+"-"+DateTime.Now.Month.ToString()+"-"+DateTime.Now.Day.ToString()+"_" + DateTime.Now.Hour.ToString() + "-" + DateTime.Now.Minute.ToString() +"-"+DateTime.Now.Second.ToString()+ "_" + DateTime.Now.Millisecond.ToString() + ".txt";
     listBox = target;
     listBox.Items.Add("Robot Control Panel v0.13 LOG");
     listBox.Items.Add("Log start: " + DateTime.Now.ToString());
     listBox.Items.Add("Robot: " + _robot);
     listBox.Items.Add("Database version: " + _dbversion);
     listBox.Items.Add("-------------------------------");
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.uxMessagesListBox = new System.Windows.Forms.ListBox();
     this.uxUpdateLinkLabel = new System.Windows.Forms.LinkLabel();
     this.uxCheckerBackgroundWorker = new System.ComponentModel.BackgroundWorker();
     this.uxUpdateBackgroundWorker = new System.ComponentModel.BackgroundWorker();
     this.SuspendLayout();
     //
     // uxMessagesListBox
     //
     this.uxMessagesListBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                 | System.Windows.Forms.AnchorStyles.Left)
                 | System.Windows.Forms.AnchorStyles.Right)));
     this.uxMessagesListBox.FormattingEnabled = true;
     this.uxMessagesListBox.Location = new System.Drawing.Point(5, 6);
     this.uxMessagesListBox.Name = "uxMessagesListBox";
     this.uxMessagesListBox.Size = new System.Drawing.Size(238, 160);
     this.uxMessagesListBox.TabIndex = 0;
     //
     // uxUpdateLinkLabel
     //
     this.uxUpdateLinkLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     this.uxUpdateLinkLabel.AutoSize = true;
     this.uxUpdateLinkLabel.Enabled = false;
     this.uxUpdateLinkLabel.Location = new System.Drawing.Point(121, 172);
     this.uxUpdateLinkLabel.Name = "uxUpdateLinkLabel";
     this.uxUpdateLinkLabel.Size = new System.Drawing.Size(42, 13);
     this.uxUpdateLinkLabel.TabIndex = 1;
     this.uxUpdateLinkLabel.TabStop = true;
     this.uxUpdateLinkLabel.Text = "Update";
     this.uxUpdateLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.uxUpdateLinkLabel_LinkClicked);
     //
     // uxCheckerBackgroundWorker
     //
     this.uxCheckerBackgroundWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.uxCheckerBackgroundWorker_DoWork);
     this.uxCheckerBackgroundWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.uxCheckerBackgroundWorker_RunWorkerCompleted);
     //
     // uxUpdateBackgroundWorker
     //
     this.uxUpdateBackgroundWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.uxUpdateBackgroundWorker_DoWork);
     this.uxUpdateBackgroundWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.uxUpdateBackgroundWorker_RunWorkerCompleted);
     //
     // UpdateForm
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(247, 190);
     this.Controls.Add(this.uxUpdateLinkLabel);
     this.Controls.Add(this.uxMessagesListBox);
     this.Name = "UpdateForm";
     this.Text = "Update";
     this.Load += new System.EventHandler(this.UpdateForm_Load);
     this.ResumeLayout(false);
     this.PerformLayout();
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.lstDevices = new System.Windows.Forms.ListBox();
     this.btnConnect = new System.Windows.Forms.Button();
     this.btnCancel = new System.Windows.Forms.Button();
     this.SuspendLayout();
     //
     // lstDevices
     //
     this.lstDevices.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.lstDevices.FormattingEnabled = true;
     this.lstDevices.Location = new System.Drawing.Point(13, 13);
     this.lstDevices.Name = "lstDevices";
     this.lstDevices.Size = new System.Drawing.Size(759, 108);
     this.lstDevices.TabIndex = 0;
     //
     // btnConnect
     //
     this.btnConnect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.btnConnect.Location = new System.Drawing.Point(604, 135);
     this.btnConnect.Name = "btnConnect";
     this.btnConnect.Size = new System.Drawing.Size(75, 23);
     this.btnConnect.TabIndex = 1;
     this.btnConnect.Text = "Refresh";
     this.btnConnect.UseVisualStyleBackColor = true;
     this.btnConnect.Click += new System.EventHandler(this.btnConnect_Click);
     //
     // btnCancel
     //
     this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.btnCancel.Location = new System.Drawing.Point(693, 135);
     this.btnCancel.Name = "btnCancel";
     this.btnCancel.Size = new System.Drawing.Size(75, 23);
     this.btnCancel.TabIndex = 2;
     this.btnCancel.Text = "Cancel";
     this.btnCancel.UseVisualStyleBackColor = true;
     this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
     //
     // ConnectDevice
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(784, 162);
     this.Controls.Add(this.btnCancel);
     this.Controls.Add(this.btnConnect);
     this.Controls.Add(this.lstDevices);
     this.Name = "ConnectDevice";
     this.Text = "Connect Barcode Scanner";
     this.Load += new System.EventHandler(this.ConnectDevice_Load);
     this.ResumeLayout(false);
 }
示例#60
0
 /// <summary> 
 /// 设计器支持所需的方法 - 请勿 
 /// 使用代码编辑器修改此方法的内容。
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SimpleControl));
     this._coffeePicture = new System.Windows.Forms.PictureBox();
     this._coffeeList = new System.Windows.Forms.ListBox();
     this._coffeeGroup = new System.Windows.Forms.GroupBox();
     this._closeCoffeeList = new System.Windows.Forms.Button();
     ((System.ComponentModel.ISupportInitialize)(this._coffeePicture)).BeginInit();
     this._coffeeGroup.SuspendLayout();
     this.SuspendLayout();
     //
     // _coffeePicture
     //
     this._coffeePicture.Image = global::UiManagerOutlookAddIn.Properties.Resources.espressoCup_tall;
     resources.ApplyResources(this._coffeePicture, "_coffeePicture");
     this._coffeePicture.Name = "_coffeePicture";
     this._coffeePicture.TabStop = false;
     //
     // _coffeeList
     //
     resources.ApplyResources(this._coffeeList, "_coffeeList");
     this._coffeeList.FormattingEnabled = true;
     this._coffeeList.Name = "_coffeeList";
     //
     // _coffeeGroup
     //
     this._coffeeGroup.Controls.Add(this._closeCoffeeList);
     this._coffeeGroup.Controls.Add(this._coffeeList);
     this._coffeeGroup.ForeColor = System.Drawing.SystemColors.ControlLightLight;
     resources.ApplyResources(this._coffeeGroup, "_coffeeGroup");
     this._coffeeGroup.Name = "_coffeeGroup";
     this._coffeeGroup.TabStop = false;
     //
     // _closeCoffeeList
     //
     this._closeCoffeeList.ForeColor = System.Drawing.SystemColors.ControlText;
     resources.ApplyResources(this._closeCoffeeList, "_closeCoffeeList");
     this._closeCoffeeList.Name = "_closeCoffeeList";
     this._closeCoffeeList.UseVisualStyleBackColor = true;
     this._closeCoffeeList.Click += new System.EventHandler(this.closeCoffeeList_Click);
     //
     // SimpleControl
     //
     resources.ApplyResources(this, "$this");
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.BackColor = System.Drawing.SystemColors.ControlText;
     this.Controls.Add(this._coffeeGroup);
     this.Controls.Add(this._coffeePicture);
     this.Name = "SimpleControl";
     ((System.ComponentModel.ISupportInitialize)(this._coffeePicture)).EndInit();
     this._coffeeGroup.ResumeLayout(false);
     this.ResumeLayout(false);
 }