Example #1
0
 private static void Showall()
 {
     Sql = File.Exists(Appdatadir + "\\contacts.sdf") ? new Sqlmanager(Appdatadir) : new Sqlmanager("|DataDirectory|");
     if (List.InvokeRequired)
     {
         var d = new Additem(UpdateList);
         List.Invoke(d, new object[] { Sql.GetData(), true });
     }
     else
     {
         UpdateList(Sql.GetData());
     }
 }
Example #2
0
 internal Main()
 {
     InitializeComponent();
     List = list;
     Icon = Resources.icon;
     Appdatadir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\SwizzContact";
     Directory.CreateDirectory(Appdatadir);
     if(!File.Exists(Appdatadir + "\\contacts.sdf") || !File.Exists(Path.GetDirectoryName(Application.ExecutablePath) + "\\contacts.sdf"))
         Generatedb();
     Sql = File.Exists(Appdatadir + "\\contacts.sdf") ? new Sqlmanager(Appdatadir) : new Sqlmanager("|DataDirectory|");
     if(GetAutoloadState())
         return;
     var worker = new Thread(Showall);
     worker.Start();
 }
Example #3
0
        internal Main()
        {
            InitializeComponent();
            List       = list;
            Icon       = Resources.icon;
            Appdatadir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\SwizzContact";
            Directory.CreateDirectory(Appdatadir);
            if (!File.Exists(Appdatadir + "\\contacts.sdf") || !File.Exists(Path.GetDirectoryName(Application.ExecutablePath) + "\\contacts.sdf"))
            {
                Generatedb();
            }
            Sql = File.Exists(Appdatadir + "\\contacts.sdf") ? new Sqlmanager(Appdatadir) : new Sqlmanager("|DataDirectory|");
            if (GetAutoloadState())
            {
                return;
            }
            var worker = new Thread(Showall);

            worker.Start();
        }
Example #4
0
 private static void Showall()
 {
     Sql = File.Exists(Appdatadir + "\\contacts.sdf") ? new Sqlmanager(Appdatadir) : new Sqlmanager("|DataDirectory|");
     if(List.InvokeRequired) {
         var d = new Additem(UpdateList);
         List.Invoke(d, new object[] { Sql.GetData(), true });
     }
     else
         UpdateList(Sql.GetData());
 }