Exemplo n.º 1
0
        private void SaveEnvironment()
        {
            SHGlobal.SetSetting("ProjectFolder", SHGlobal.GetFolder());

            SHGlobal.SetSetting("AutoMonitorFile", (Option.AutoMonitorFile == true) ? 1 : 0);

            if (WindowState == FormWindowState.Normal)
            {
                SHGlobal.SetSetting("Width", Width);
                SHGlobal.SetSetting("Height", Height);
                SHGlobal.SetSetting("Left", Left);
                SHGlobal.SetSetting("Top", Top);
            }

            SHGlobal.SetSetting("mnuViewHideNoLoot", (mnuViewHideNoLoot.CheckState == CheckState.Checked) ? 1 : 0);
            SHGlobal.SetSetting("mnuViewHideNoninteract", (mnuViewHideNoninteract.CheckState == CheckState.Checked) ? 1 : 0);
            SHGlobal.SetSetting("mnuViewMonster", (mnuViewMonster.CheckState == CheckState.Checked) ? 1 : 0);
            SHGlobal.SetSetting("mnuViewObject", (mnuViewObject.CheckState == CheckState.Checked) ? 1 : 0);
            SHGlobal.SetSetting("mnuViewNPC", (mnuViewNPC.CheckState == CheckState.Checked) ? 1 : 0);

            for (int i = 0; i < (int)ValixianFormType.PAGE_MAX; i++)
            {
                SaveTabEnvironment(i);
            }


            SHGlobal.SaveSetting();
        }
Exemplo n.º 2
0
        public void SaveTabEnvironment(int nIndex)
        {
/*
 *          VelixianTab MatchedTab = null;
 *
 *          if (_Tabs._TabPages.TryGetValue(nIndex, out MatchedTab))
 *          {
 *              if (MatchedTab.MainList != null)
 *              {
 *                  for (int i = 0; i < MatchedTab.MainList.Columns.Count; i++)
 *                  {
 *                      ColumnHeader head = MatchedTab.MainList.Columns[i];
 *                      SHGlobal.SetSetting(MatchedTab.MainList.Name + "Col" + i.ToString(), head.Width);
 *                  }
 *
 *                  SplitContainer splitContainer = MatchedTab.MainList.Parent.Parent as SplitContainer;
 *                  if (splitContainer != null)
 *                  {
 *                      SHGlobal.SetSetting(splitContainer.Name, splitContainer.SplitterDistance);
 *
 *                      // 왼쪽 패널의 Child를 검색해서 스플리터가 있으면 환경값 저장
 *                      for (int i = 0; i < splitContainer.Panel1.Controls.Count; i++)
 *                      {
 *                          SplitContainer childContainer = splitContainer.Panel1.Controls[i] as SplitContainer;
 *                          if (childContainer != null) SHGlobal.SetSetting(childContainer.Name, childContainer.SplitterDistance);
 *                      }
 *
 *                      // 오른쪽 패널의 Child를 검색하여 스플리터가 있으면 환경값 저장
 *                      for (int i = 0; i < splitContainer.Panel2.Controls.Count; i++)
 *                      {
 *                          SplitContainer childContainer = splitContainer.Panel2.Controls[i] as SplitContainer;
 *                          if (childContainer != null) SHGlobal.SetSetting(childContainer.Name, childContainer.SplitterDistance);
 *                      }
 *                  }
 *              }
 *          }
 */
            SHGlobal.SaveSetting();
        }