当前位置: 首页>>代码示例>>C#>>正文


C# FormWindowState类代码示例

本文整理汇总了C#中FormWindowState的典型用法代码示例。如果您正苦于以下问题:C# FormWindowState类的具体用法?C# FormWindowState怎么用?C# FormWindowState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FormWindowState类属于命名空间,在下文中一共展示了FormWindowState类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnMove

		private void OnMove(object sender, System.EventArgs e)
		{			
			if (form.WindowState == FormWindowState.Normal)
				dimensions.Location = form.Location;
			
			windowState = form.WindowState;
		}
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:7,代码来源:FormSerializer.cs

示例2: LoadApplicationSettings

        private const int SettingsLocation = 0; // 0 - registry, 1 - ini-file

        #endregion Fields

        #region Methods

        public static void LoadApplicationSettings()
        {
            RegistryKey regKey = Registry.CurrentUser.OpenSubKey(SettingsAndConstants.RegistryLocation);

            LastProjectFileName = HiddenObjectStudio.Core.Tools.GetParameterFromReg(regKey, "LastProjectFile", string.Empty);
            DisplaySpriteActiveArea = HiddenObjectStudio.Core.Tools.GetParameterFromReg(regKey, "DisplaySpriteActiveArea", true);

            LastProjectBrowsePath = HiddenObjectStudio.Core.Tools.GetParameterFromReg(regKey, "LastProjectBrowsePath", string.Empty);
            LastSpriteBrowsePath = HiddenObjectStudio.Core.Tools.GetParameterFromReg(regKey, "LastSpriteBrowsePath", string.Empty);
            LastBackgroundBrowsePath = HiddenObjectStudio.Core.Tools.GetParameterFromReg(regKey, "LastBackgroundBrowsePath", string.Empty);

            if (HiddenObjectStudio.Core.Tools.GetParameterFromReg(regKey, "Maximized", false))
            {
                MainFormState = FormWindowState.Maximized;
            }
            else
            {
                MainFormPosition.Location = new Point(
                    HiddenObjectStudio.Core.Tools.GetParameterFromReg(regKey, "WindowLeft", 0),
                    HiddenObjectStudio.Core.Tools.GetParameterFromReg(regKey, "WindowTop", 0)
                    );
                MainFormPosition.Width = HiddenObjectStudio.Core.Tools.GetParameterFromReg(regKey, "WindowWidth", 0);
                MainFormPosition.Height = HiddenObjectStudio.Core.Tools.GetParameterFromReg(regKey, "WindowHeight", 0);
                MainFormState = FormWindowState.Normal;
            }

            LoadPreferences();

            if (regKey != null) regKey.Close();
        }
开发者ID:NTStudio,项目名称:XMLSceneBuilder,代码行数:36,代码来源:SettingsAndConstants.cs

示例3: return

 public static FormWindowState «агрузить(string путь, string секци¤, string им¤, FormWindowState значениеѕо”молчанию)
 {
     int число = «агрузить(путь, секци¤, им¤, (int)значениеѕо”молчанию);
     if (число < 0 || число > 2)
         return значениеѕо”молчанию;
     return (FormWindowState)число;
 }
开发者ID:1vanK,项目名称:Constructor-2,代码行数:7,代码来源:Ini.cs

示例4: SaveFormState

 private void SaveFormState(Form a_form)
 {
     if (a_form.WindowState == FormWindowState.Normal)
         m_bounds = a_form.Bounds;
     if (a_form.WindowState != FormWindowState.Minimized)
         m_window_state = a_form.WindowState;
 }
开发者ID:KebinuChiousu,项目名称:MangaCrawler,代码行数:7,代码来源:FormState.cs

示例5: load

        public void load()
        {
            using (RegistryKey r = Registry.CurrentUser.OpenSubKey(@"Software\" + CompanyId() + @"\" + AppId() + @"\Window State\" + form.Name))
            {
                if (r != null)
                {
                    try
                    {
                        string _location = (string)r.GetValue("location"), _size = (string)r.GetValue("size");
                        state = (FormWindowState)r.GetValue("state");
                        location = (Point)TypeDescriptor.GetConverter(typeof(Point)).ConvertFromInvariantString(_location);
                        size = (Size)TypeDescriptor.GetConverter(typeof(Size)).ConvertFromInvariantString(_size);

                        // Don't do anything if the screen config has since changed (otherwise windows vanish off the side)
                        if (screenconfig() == new MD5Sum((string) r.GetValue("screenconfig")))
                        {
                            form.Location = location;
                            form.Size = size;
                            // Don't restore if miminised (it's unhelpful as the user misses the fact it's opened)
                            if (state != FormWindowState.Minimized)
                                form.WindowState = state;
                        }
                    }
                    catch (Exception)
                    {
                    }
                }
            }
        }
开发者ID:ned14,项目名称:BEurtle,代码行数:29,代码来源:WindowSettings.cs

示例6: FormLayout

 internal FormLayout(DlgBase form)
 {
     if (Program.IsClosing || ((!form.Disposing && !form.IsDisposed) && (form.WindowState != FormWindowState.Minimized)))
     {
         this.mBounds = form.Bounds;
         if (this.mBounds.X == -32000)
         {
             this.mBounds.X = 0;
         }
         if (this.mBounds.Y == -32000)
         {
             this.mBounds.Y = 0;
         }
         if (form.WindowState == FormWindowState.Minimized)
         {
             this.mWindowState = FormWindowState.Normal;
         }
         else
         {
             this.mWindowState = form.WindowState;
         }
         this.mSaveLoadData = form.LayoutData;
         this.mWasOpenOnExit = (Program.IsClosing && form.AllowRestoreWindow) && form.Visible;
         this.mFormType = form.GetType();
     }
 }
开发者ID:micheljung,项目名称:gpgnetfix,代码行数:26,代码来源:FormLayout.cs

示例7: Launcher_Load

        private void Launcher_Load(object sender, EventArgs e)
        {
            this.Icon = DnDCS.Win.Libs.Assets.AssetsLoader.LauncherIcon;

            initialFormTopMost = this.TopMost;
            initialFormBorderStyle = this.FormBorderStyle;
            initialFormWindowState = this.WindowState;

            if (this.runMode.HasValue)
            {
                switch (this.runMode.Value)
                {
                    case Constants.RunMode.Client:
                        this.btnClient.PerformClick();
                        break;

                    case Constants.RunMode.Server:
                        this.btnServer.PerformClick();
                        break;

                    default:
                        break;
                }
            }
        }
开发者ID:philazzi44,项目名称:DnDCS,代码行数:25,代码来源:Launcher.cs

示例8: FormNalog

 public FormNalog(Terminal _terminal, Katalog _katalog, Point _koordinate, int _širina, int _visina, FormWindowState _stanje, KNalog _nalog)
     : base(_terminal, _katalog, _koordinate, _širina, _visina, _stanje)
 {
     InitializeComponent();
     dgvNalog.AutoGenerateColumns = false;
     dgvNalog.Columns["colPromet"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
     dgvNalog.Columns["colSken"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
     this.nalog = _nalog;
     txtDok.Focus();
     CoreScannerProxy.Instance.BarcodeEvent += new BarcodeEventHandler(OnBarcode); // Događaj za očitanje barkoda.
     if (nalog != null)
     {
         txtDok.Text =
             this.nalog.dokVrsta +
             this.nalog.sklaOznaka +
             (this.nalog.dokVrsta == "PSS" ? this.nalog.sklaOznakaPSS : String.Empty) +
             this.nalog.dokBr +
             ((from r in this.katalog.dokumenti where r.vrsta == this.nalog.dokVrsta select r).Single().oznaka);
         PrikažiNalog(
             this.nalog.sklaOznaka,
             this.nalog.sklaOznakaPSS,
             this.nalog.dokVrsta,
             this.nalog.dokBr,
             this.nalog.smjer);
     }
 }
开发者ID:Brumiko,项目名称:MobTrenisIS,代码行数:26,代码来源:FormNalog.cs

示例9: WindowLocation

            /// <summary>
            /// Initializes a new instance of the WindowLocation class.
            /// </summary>
            /// <param name="input">The input string.</param>
            public WindowLocation(string input)
            {
                Param.AssertValidString(input, "input");

                string[] sections = input.Split(',');
                if (sections.Length < 5)
                {
                    throw new ArgumentException(string.Format(
                        CultureInfo.CurrentCulture, Strings.InvalidWindowLocationInputString, input));
                }

                this.location.X = Convert.ToInt32(sections[0], null);
                this.location.Y = Convert.ToInt32(sections[1], null);
                this.size.Height = Convert.ToInt32(sections[2], null);
                this.size.Width = Convert.ToInt32(sections[3], null);

                int state = Convert.ToInt32(sections[4], null);
                if (state < 0)
                {
                    this.state = FormWindowState.Minimized;
                }
                else if (state > 0)
                {
                    this.state = FormWindowState.Maximized;
                }
                else if (state == 0)
                {
                    this.state = FormWindowState.Normal;
                }
            }
开发者ID:katerina-marchenkova,项目名称:my,代码行数:34,代码来源:RegistryUtils.WindowLocation.cs

示例10: OnLocationChanged

		protected override void OnLocationChanged(EventArgs e)
		{
			base.OnLocationChanged(e);

			if (WindowState != FormWindowState.Minimized)
				LastNonMinimizedState = WindowState;
		}
开发者ID:rsdn,项目名称:janus,代码行数:7,代码来源:JanusBaseForm.cs

示例11: Initialize

		public void Initialize(Rectangle position, FormWindowState state, bool detailView, bool loggerTree)
		{
			WindowPosition = position;
			WindowState = state;
			ShowLogDetailView = detailView;
			ShowLoggerTree = loggerTree;
		}
开发者ID:ASK-sa,项目名称:ASK.ServEasy,代码行数:7,代码来源:UserSettings.cs

示例12: activateForm

        public void activateForm(Form f, FormWindowState ws, FormStartPosition fs)
        {
            demandBackup = true;
            foreach (Form each in MdiChildren)
            {
                if ((string)each.Tag != "1")
                {
                    each.Close();
                }
            }

            if (fs == FormStartPosition.Manual)
            {
                f.StartPosition = FormStartPosition.Manual;
                int w = this.Width;
                int h = this.Height;
                f.Left = (w - f.Width) / 4;
                f.Top = (h - f.Height) / 6;
            }
            else
            {
                f.StartPosition = fs;
            }
            f.WindowState = ws;
            f.MdiParent = this;
            f.ControlBox = false;
            f.Show();
        }
开发者ID:rjreeves,项目名称:Vectra,代码行数:28,代码来源:Frame.cs

示例13: FormRobneLokacije

 public FormRobneLokacije(Terminal _terminal, Katalog _katalog, Point _koordinate, int _širina, int _visina, FormWindowState _stanje)
     : base(_terminal, _katalog, _koordinate, _širina, _visina, _stanje)
 {
     InitializeComponent();
     dgvRobneLokacije.AutoGenerateColumns = false;
     CoreScannerProxy.Instance.BarcodeEvent += new BarcodeEventHandler(OnBarcode); // Događaj za očitanje barkoda.
     txtŠifraIliBarkod.Select();
     ddlSkladište.DataSource = this.katalog.skladišta;
     try
     {
         zadanoSkladište = ConfigurationManager.AppSettings["ZadanoSkladište"];
         if (String.IsNullOrEmpty(zadanoSkladište))
         {
             return;
         }
         for (int i = 0; i < ddlSkladište.Items.Count; i++)
         {
             if (((KSkladiste)ddlSkladište.Items[i]).oznaka == ConfigurationManager.AppSettings["ZadanoSkladište"])
             {
                 ddlSkladište.SelectedIndex = i;
                 break;
             }
         }
     }
     catch (ConfigurationErrorsException)
     {
         // Pojeo vuk magare iliti On error resume next.
     }
 }
开发者ID:Brumiko,项目名称:MobTrenisIS,代码行数:29,代码来源:FormRobneLokacije.cs

示例14: BindGrid

        private void BindGrid(DbConnection conn)
        {
            conn.Open();
                _schema = new DataSet();
                var schema = conn.GetSchema();

                foreach (DataRow dataRow in schema.Rows)
                {
                    var tableName = dataRow["CollectionName"].ToString();
                    if(!_schema.Tables.Contains(tableName))
                    {
                        var dt = conn.GetSchema(tableName);
                        dt.TableName = tableName;
                        _schema.Tables.Add(dt);
                    }
                }
                conn.Close();
                dgSchema.DataSource = _schema.Tables[0];

                cbTable.DataSource = _schema.Tables[0];
                cbTable.DisplayMember = "CollectionName";
                cbTable.ValueMember = "CollectionName";
                _previousWidth = dgSchema.Width;
                _previousState = WindowState;
        }
开发者ID:jschementi,项目名称:ironruby-dbi,代码行数:25,代码来源:Form1.cs

示例15: Save

 public void Save(Form targetForm)
 {
     winState = targetForm.WindowState;
     brdStyle = targetForm.FormBorderStyle;
     topMost = targetForm.TopMost;
     bounds = targetForm.Bounds;
 }
开发者ID:icehokie,项目名称:DailyFive,代码行数:7,代码来源:FormState.cs


注:本文中的FormWindowState类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。