コード例 #1
0
        private void comboBoxHotItemStyle_SelectedIndexChanged(object sender, EventArgs e)
        {
            ComboBox cb = (ComboBox)sender;

            listWindow.HotItemStyle = (OLVHotItemStyle)cb.SelectedIndex;
            OLVHelper.SetHotItemStyle(listView, (OLVHotItemStyle)cb.SelectedIndex);
        }
コード例 #2
0
 private void LoadConfig()
 {
     try
     {
         string filename = null;
         if (DlgMode)
         {
             filename = GetStateConfigFileName(true);
             if (!File.Exists(filename))
             {
                 filename = GetStateConfigFileName(false);
             }
         }
         else
         {
             filename = GetStateConfigFileName(false);
         }
         if (File.Exists(filename))
         {
             configFileStr = File.ReadAllText(filename, Encoding.UTF8);
             OLVStateAdv state = JsonSerializeHelper.LoadFromString <OLVStateAdv>(configFileStr);
             if (listView != null)
             {
                 OLVHelper.RestoreStateAdvanced(listView, state);
             }
             HotItemStyle = state.HotItemStyle;
             OLVHelper.SetHotItemStyle(listView, HotItemStyle);
             LoadUserSettings(state.UserSettings);
         }
     }
     catch (Exception ex)
     {
         Log.LogError("Can not read config for " + GetType().ToString(), ex);
     }
 }