コード例 #1
0
ファイル: SitesStateForm.cs プロジェクト: ppkdch54/Shuiwen
        public void ResiteSites(int col)
        {
            if (ssfs.Count <= 0)
            {
                return;
            }
            colCount = col;
            UiChange.Set(GetKey(), colCount.ToString());
            int sWidth  = (flowLayouSites.Width / colCount) - 10;
            int sHeight = (flowLayouSites.Height / (ssfs.Count / colCount + ssfs.Count % colCount)) - 10;

            foreach (KeyValuePair <uint, SiteStateForm> smf in ssfs)
            {
                smf.Value.Size = new Size(sWidth, sHeight);
            }
        }
コード例 #2
0
        public SiteStateForm(Site st)
        {
            InitializeComponent();
            site = st;
            RefreshForms();
            toolStripNum.Text  = "编号:" + st.num.ToString();
            toolStripName.Text = "名称:" + st.name;
            string v = UiChange.Get(GetKey());

            if (v.Length > 0)
            {
                colCount = Convert.ToInt32(v);
            }
            else
            {
                colCount = 1;
            }
        }
コード例 #3
0
 private void toolStripComboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     colCount = toolStripComboBox1.SelectedIndex + 1;
     UiChange.Set(GetKey(), colCount.ToString());
     ResizeSensors(colCount);
 }