Inheritance: System.Windows.DependencyObject, ILoadable, IAsyncObject, INotifyPropertyChanged
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/%E5%A5%A5%E6%9E%AB%E7%87%83%E6%B0%94%E8%90%A5%E6%94%B6%E7%B3%BB%E7%BB%9FV3;compo" +
                 "nent/Pages/%E7%AE%A1%E7%90%86%E5%91%98%E7%99%BB%E5%BD%95.xaml", System.UriKind.Relative));
     this.glydl = ((Com.Aote.Controls.CustomChildWindow)(this.FindName("glydl")));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.SysTime = ((Com.Aote.ObjectTools.SystemTime)(this.FindName("SysTime")));
     this.GaoguanliUser = ((Com.Aote.ObjectTools.GeneralObject)(this.FindName("GaoguanliUser")));
     this.name = ((System.Windows.Controls.TextBox)(this.FindName("name")));
     this.password = ((System.Windows.Controls.PasswordBox)(this.FindName("password")));
     this.okbutton = ((System.Windows.Controls.Button)(this.FindName("okbutton")));
     this.xglimitgas = ((System.Windows.Controls.Grid)(this.FindName("xglimitgas")));
     this.apply = ((System.Windows.Controls.Grid)(this.FindName("apply")));
     this.applygo = ((Com.Aote.ObjectTools.GeneralObject)(this.FindName("applygo")));
     this.userfile = ((System.Windows.Controls.Grid)(this.FindName("userfile")));
     this.save = ((System.Windows.Controls.Button)(this.FindName("save")));
 }
Esempio n. 2
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/%E5%A5%A5%E6%9E%AB%E7%87%83%E6%B0%94%E8%90%A5%E6%94%B6%E7%B3%BB%E7%BB%9FV3;compo" +
                                                                   "nent/Frame.xaml", System.UriKind.Relative));
     this.CustomTypes             = ((Com.Aote.ObjectTools.CustomTypes)(this.FindName("CustomTypes")));
     this.SecRefresh              = ((Com.Aote.ObjectTools.Timer)(this.FindName("SecRefresh")));
     this.FiveMinRefresh          = ((Com.Aote.ObjectTools.Timer)(this.FindName("FiveMinRefresh")));
     this.LoginUser               = ((Com.Aote.ObjectTools.GeneralObject)(this.FindName("LoginUser")));
     this.Organization            = ((Com.Aote.ObjectTools.GeneralObject)(this.FindName("Organization")));
     this.SysTime                 = ((Com.Aote.ObjectTools.SystemTime)(this.FindName("SysTime")));
     this.Seria                   = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("Seria")));
     this.Seriab                  = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("Seriab")));
     this.Seriadw                 = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("Seriadw")));
     this.Seriabj                 = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("Seriabj")));
     this.Seriabjf                = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("Seriabjf")));
     this.Seriahtm                = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("Seriahtm")));
     this.Seriahtfmc              = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("Seriahtfmc")));
     this.Seriahtfmg              = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("Seriahtfmg")));
     this.Seriahtfmh              = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("Seriahtfmh")));
     this.DW                      = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("DW")));
     this.arealist                = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("arealist")));
     this.citylist                = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("citylist")));
     this.guikoulist              = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("guikoulist")));
     this.gridlist                = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("gridlist")));
     this.roadlist                = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("roadlist")));
     this.yldjlist                = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("yldjlist")));
     this.buystylelist            = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("buystylelist")));
     this.statelist               = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("statelist")));
     this.installstylelist        = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("installstylelist")));
     this.kitcheninstallstylelist = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("kitcheninstallstylelist")));
     this.yesornolist             = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("yesornolist")));
     this.Clipboard               = ((Com.Aote.ObjectTools.ClipboardObj)(this.FindName("Clipboard")));
     this.single                  = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("single")));
     this.@params                 = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("params")));
     this.MainFrame               = ((System.Windows.Controls.ContentControl)(this.FindName("MainFrame")));
 }
Esempio n. 3
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/%E5%A5%A5%E6%9E%AB%E7%87%83%E6%B0%94%E8%90%A5%E6%94%B6%E7%B3%BB%E7%BB%9FV3;compo" +
                                                                   "nent/Pages/%E7%AE%A1%E7%90%86%E5%91%98%E7%99%BB%E5%BD%95.xaml", System.UriKind.Relative));
     this.glydl         = ((Com.Aote.Controls.CustomChildWindow)(this.FindName("glydl")));
     this.LayoutRoot    = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.SysTime       = ((Com.Aote.ObjectTools.SystemTime)(this.FindName("SysTime")));
     this.GaoguanliUser = ((Com.Aote.ObjectTools.GeneralObject)(this.FindName("GaoguanliUser")));
     this.name          = ((System.Windows.Controls.TextBox)(this.FindName("name")));
     this.password      = ((System.Windows.Controls.PasswordBox)(this.FindName("password")));
     this.okbutton      = ((System.Windows.Controls.Button)(this.FindName("okbutton")));
     this.xglimitgas    = ((System.Windows.Controls.Grid)(this.FindName("xglimitgas")));
     this.apply         = ((System.Windows.Controls.Grid)(this.FindName("apply")));
     this.applygo       = ((Com.Aote.ObjectTools.GeneralObject)(this.FindName("applygo")));
     this.userfile      = ((System.Windows.Controls.Grid)(this.FindName("userfile")));
     this.save          = ((System.Windows.Controls.Button)(this.FindName("save")));
 }
Esempio n. 4
0
 public void ShowMessage(string msg)
 {
     //检查是否有当天日期名称文件,没有创建,已创建,追加
    IsolatedStorageFile isf =  IsolatedStorageFile.GetUserStoreForApplication();
    SystemTime st = new SystemTime();
    string fileName = st.Now.ToString("yyyy-MM-dd");
    if (isf.FileExists(fileName))
    {
        IsolatedStorageFileStream isfstream = isf.OpenFile(fileName, FileMode.Append);
        StreamWriter sw = new StreamWriter(isfstream);
        sw.WriteLine(msg);
        sw.Close();
    }
    else
    {
       IsolatedStorageFileStream  isfstream = isf.CreateFile(fileName);
       StreamWriter sw = new StreamWriter(isfstream);
       sw.WriteLine(msg);
       sw.Close();
    }
     
 }
Esempio n. 5
0
 /**
  * 电话初始化动作
  * */
 private void Init()
 {
     //装载电话配置文件
     //this.ConfigFile = new XmlFile("Phone.xml");
     //判断是否进行话务工作
     if (!isAnswer())
     {
         return;
     }
     //加载状态对照表
     //LoadPhoneStates();
     //后台语音服务器地址
     //this.TelServiceUrl = this.ConfigFile.getProperty("TelService", "uri");
     //LoginUser user = (LoginUser)Tools.Session["loginuser"];
     //this.LineNum = (string)user["linenum"];
     //this.GongHao = (string)user["gonghao"];
    
     //启动工作线程
     DispatcherTimer work = new DispatcherTimer();
     work.Interval = TimeSpan.FromSeconds(1);
     work.Tick += new EventHandler(work_Tick);
     work.Start();
     if (this.isRecordDB)
     {
         SystemTime t = new SystemTime();
         loginTime = t.Now;
         this.recordId = System.Guid.NewGuid().ToString();
         //启动保存置忙时间线程
         DispatcherTimer save = new DispatcherTimer();
         save.Interval = TimeSpan.FromSeconds(30);
         save.Tick += new EventHandler(Save_Tick);
         save.Start();
     }
 }
Esempio n. 6
0
 public JsonObject ToJson()
 {
     SystemTime t = new SystemTime();
     //对象转化成json
     JsonObject json = new JsonObject();
     //放置实体类型
     json["EntityType"] = "t_opbusyrecord";
     Dictionary<string, object> attrs = new  Dictionary<string, object>();
     attrs["logintime"] = loginTime.ToString("yyyyMMdd HH:mm:ss");
     attrs["exittime"] = t.Now.ToString("yyyyMMdd HH:mm:ss");
     attrs["busytime"] = busySec;
     attrs["gonghao"] = GongHao;
     attrs["id"] = this.recordId;
     attrs["recordtime"] = t.Now.ToString("yyyyMMdd HH:mm:ss");
     foreach (KeyValuePair<string, object> kvp in attrs)
     {
         
         //整数类型,可以为空
          if (kvp.Value is int)
             json[kvp.Key] = (int)kvp.Value;
         //double类型,可以为空
         else if (kvp.Value is double)
             json[kvp.Key] = (double)kvp.Value;
         //decimal
         else if (kvp.Value is decimal)
             json[kvp.Key] = (decimal)kvp.Value;
         //bool型
         else if (kvp.Value is bool)
             json[kvp.Key] = (bool)kvp.Value;
         //字符串
         else if (kvp.Value is string)
             json[kvp.Key] = kvp.Value as string;
         //日期
         else if (kvp.Value is DateTime)
         {
             //DateTime from1970 = new DateTime(1970, 1, 1,0,0,0);
             DateTime from1970 = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Local);
             DateTime valDate = (DateTime)kvp.Value;
             TimeSpan ts = valDate.ToUniversalTime() - from1970;
             json[kvp.Key] = (Int64)(ts.TotalMilliseconds + 0.5);
         }
         //列表数据
         else if (kvp.Value is BaseObjectList)
             json[kvp.Key] = (kvp.Value as BaseObjectList).ToJson();
         else
             throw new Exception("不认识的字段类型, " + kvp.Value.GetType());
     }
     return json;
 }
Esempio n. 7
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/%E5%A5%A5%E6%9E%AB%E7%87%83%E6%B0%94%E8%90%A5%E6%94%B6%E7%B3%BB%E7%BB%9FV3;compo" +
                 "nent/Frame.xaml", System.UriKind.Relative));
     this.CustomTypes = ((Com.Aote.ObjectTools.CustomTypes)(this.FindName("CustomTypes")));
     this.SecRefresh = ((Com.Aote.ObjectTools.Timer)(this.FindName("SecRefresh")));
     this.FiveMinRefresh = ((Com.Aote.ObjectTools.Timer)(this.FindName("FiveMinRefresh")));
     this.LoginUser = ((Com.Aote.ObjectTools.GeneralObject)(this.FindName("LoginUser")));
     this.Organization = ((Com.Aote.ObjectTools.GeneralObject)(this.FindName("Organization")));
     this.SysTime = ((Com.Aote.ObjectTools.SystemTime)(this.FindName("SysTime")));
     this.Seria = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("Seria")));
     this.Seriab = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("Seriab")));
     this.Seriadw = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("Seriadw")));
     this.Seriabj = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("Seriabj")));
     this.Seriabjf = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("Seriabjf")));
     this.Seriahtm = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("Seriahtm")));
     this.Seriahtfmc = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("Seriahtfmc")));
     this.Seriahtfmg = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("Seriahtfmg")));
     this.Seriahtfmh = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("Seriahtfmh")));
     this.DW = ((Com.Aote.ObjectTools.SeriaNumber)(this.FindName("DW")));
     this.arealist = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("arealist")));
     this.citylist = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("citylist")));
     this.guikoulist = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("guikoulist")));
     this.gridlist = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("gridlist")));
     this.roadlist = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("roadlist")));
     this.yldjlist = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("yldjlist")));
     this.buystylelist = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("buystylelist")));
     this.statelist = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("statelist")));
     this.installstylelist = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("installstylelist")));
     this.kitcheninstallstylelist = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("kitcheninstallstylelist")));
     this.yesornolist = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("yesornolist")));
     this.Clipboard = ((Com.Aote.ObjectTools.ClipboardObj)(this.FindName("Clipboard")));
     this.single = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("single")));
     this.@params = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("params")));
     this.MainFrame = ((System.Windows.Controls.ContentControl)(this.FindName("MainFrame")));
 }