private void MoveDown() { if (SwStyles.Count == 0) { return; } var last = SwStyles.Last(); SwStyles.Remove(last); DescriptionStyles.Insert(0, last); }
private void ImportWordDocument() { if (CurrentItem == null) { return; } if (CurrentItem.GetAllParts().Count > 0) { throw new Exception("Item not empty"); } ErrorText = ""; if (Paragraphs == null || Paragraphs.Count == 0) { ErrorText = "No word-file selected!"; return; } try { InformationText = "Word import started!"; ValidateParagraphs(Paragraphs, DescriptionStyles.ToList()); using (var wrapper = new ThreadedWindowWrapper()) { wrapper.LaunchThreadedWindow <WindowLoadingProgress>(true); wrapper.SetTitle("Importing word document"); Import imp = new Import(_currentItem, Paragraphs, SwStyles.ToList(), DescriptionStyles.ToList(), SWConnection.Instance.Broker.ServerId, wrapper); } InformationText = "Word import completed!"; } catch (Exception) { throw; } }