/// <summary> /// 保存配置类实例 /// </summary> /// <returns></returns> public static bool SaveConfig(TradeConfigInfo apiconfiginfo) { TradeConfigFileManager acfm = new TradeConfigFileManager(); TradeConfigFileManager.ConfigInfo = apiconfiginfo; return(acfm.SaveConfig()); }
private void acc_Loaded(object sender, RoutedEventArgs e) { tc = this.DataContext as TradeConfigInfo; //if (tc != null) //{ // switch (tc.ObjCode) // { // case "CCFJSSJ"://0-23 // break; // case "GDYXQ"://-1 - // break; // case "YKGS"://最大50个字符 // break; // default: // break; // } // Binding b = new Binding() { Path = new PropertyPath("ObjValue"), Mode= BindingMode.TwoWay, UpdateSourceTrigger = UpdateSourceTrigger.Explicit }; // b.ValidationRules.Add(); // this.txtObjValue.SetBinding(TextBox.TextProperty, b); //} }
public DigitalTrade() { TradeConfigInfo tradeConfigInfo = TradeConfigs.GetConfig(); _input_charset = tradeConfigInfo.Alipayconfiginfo.Inputcharset; _partner = tradeConfigInfo.Alipayconfiginfo.Partner; _sign = tradeConfigInfo.Alipayconfiginfo.Sign; //tradeConfigInfo.Alipayconfiginfo.Inputcharset = "utf-8"; //tradeConfigInfo.Alipayconfiginfo.Partner = "2088002052150939"; //tradeConfigInfo.Alipayconfiginfo.Sign = "gh0bis45h89m5mwcoe85us4qrwispes0"; TradeConfigs.SaveConfig(tradeConfigInfo); }
private void CommandBinding_Executed_Delete(object sender, ExecutedRoutedEventArgs e) { TradeConfigInfo selInfo = (e.OriginalSource as DataGridRow).DataContext as TradeConfigInfo; vm.DelTradingSettingInfo(selInfo); }
private void DataGridRow_MouseDoubleClick(object sender, MouseEventArgs e) { TradeConfigInfo selInfo = (e.Source as DataGridRow).DataContext as TradeConfigInfo; vm.ModifyTradingSettingInfo(selInfo); }