public void OpenWorkSpace() { if (DiscardChanges()) { OpenFileDialog open = new OpenFileDialog(); open.DefaultExt = ".scumle"; open.Filter = "(.scumle)|*.scumle"; List <ModelBase> loadedModelsList = new List <ModelBase>(); // Show open file dialog box bool?result = open.ShowDialog(); // Process open file dialog box results if (result == true) { LoadThread loadThread = new LoadThread(Shapes, Lines, Path.GetFullPath(open.FileName)); loadThread.Start(); Shapes.Clear(); Lines.Clear(); UndoRedo.clear(); UndoRedo.ChangeSinceSave = false; _currentFilePath = Path.GetFullPath(open.FileName); } } }
public HttpDownload() { loadSizeThread = new LoadSizeThread(this); for (int i = 0; i < ProcessorCount; i++) { LoadThread thread = new LoadThread(this, i); loadThreadList.Add(thread); } }
public void Dispose() { // n.b. Resize uses this -- we may need to refactor if we need to do something permanent LoadCancel = true; LoadThread.Join(); foreach (var ap in Packets) { using (ap.RestartPosition) {} } Packets.Clear(); Debug.Assert(!LoadThread.IsAlive); // We assert this... LoadPacketBuffer.Clear(); // ... because we're not locking this. }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Create your application here SetContentView(Resource.Layout.loading); mainlayout = (LinearLayout)FindViewById(Resource.Id.mainlayout); mSharedPreference = GetSharedPreferences(Constant.Com_Fra, FileCreationMode.WorldWriteable); lodimgsrc = mSharedPreference.GetString(Constant.Lod_Img, ""); if (lodimgsrc != "") { Bitmap bmp = getLoacalBitmap(lodimgsrc); if (bmp != null) { mainlayout.SetBackgroundDrawable(new BitmapDrawable(bmp)); } } else { } mHandler.mcontext = this; //timeoutrunable = new Runnable(() => //{ // isTimeout = true; // Message msg = Message.Obtain(); // msg.What = MSG_INIT_TIMEOUT; // mHandler.SendMessage(msg); //}); //mHandler.PostDelayed(timeoutrunable, 60000); LoadThread loadthread = new LoadThread(); loadthread.context = this; loadthread.Start(); }