public void Start(Define tmp, ref ProgressBar prog, Dispatcher dp, string call) { //token = new CancellationTokenSource(); theCall = call; //if (temp == null && prg == null && this.dp == null) //{ //temp = (from k in d.Defines where tmp.Id == k.Id select k).ToList()[0]; temp = tmp; this.server = temp.Server; this.server_name = temp.Server_Name; this.path = temp.File_Path; if (temp.File_Size.HasValue) { this.size = temp.File_Size.Value; } if (temp.Last_Modified.HasValue) { this.lastModifiedDate = temp.Last_Modified.Value; } this.dp = dp; prg = prog; //} //Dispatcher.CurrentDispatcher.BeginInvoke((Action)(() => { MainWindow.progressBars[def.Id].Visibility = Visibility.Hidden; })); d.SubmitChanges(); try { invokeTask();// to initiate task1 started = true; task1.Start(); } catch (Exception g) { } }
public void TaskStart(Define tmp) { theCall = "external"; token = new CancellationTokenSource(); temp = tmp; this.server = temp.Server; this.server_name = temp.Server_Name; this.path = temp.File_Path; if (temp.File_Size.HasValue) { this.size = temp.File_Size.Value; } if (temp.Last_Modified.HasValue) { this.lastModifiedDate = temp.Last_Modified.Value; } //} d.SubmitChanges(); try { started = true; invokeTask();// to initiate task1 //task1.Start(); } catch (Exception g) { } }
partial void UpdateDefine(Define instance);
partial void DeleteDefine(Define instance);
partial void InsertDefine(Define instance);