MCPcopy Create free account
hub / github.com/HO-COOH/FastCopy / normalLaunch

Method normalLaunch

FastCopy/App.xaml.cpp:122–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122void App::normalLaunch()
123{
124 auto const destination = Command::Get().GetDestination();
125 if (destination.empty())
126 return;
127
128 auto const recordFile = Command::Get().RecordFile();
129 auto viewModel = ViewModelLocator::GetInstance().RobocopyViewModel();
130
131#ifndef _DEBUG
132 if (recordFile.empty())
133 return;
134#endif // !_DEBUG
135
136
137 viewModel.Destination(destination);
138 viewModel.RecordFile(recordFile);
139 viewModel.Finished([recordFile](auto, FinishState state) {
140#ifndef _DEBUG
141 if (state == FinishState::Success)
142 std::filesystem::remove(recordFile.data());
143#endif
144 });
145
146 LOGI(L"App started, record file: {}", recordFile.data());
147
148 window = make<CopyDialogWindow>();
149 window.Activate();
150 Global::windowEffectHelper.SetTarget(window);
151 Global::windowEffectHelper.SetListenThemeChange();
152 viewModel.Start();
153}

Callers

nothing calls this directly

Calls 9

GetDestinationMethod · 0.80
DestinationMethod · 0.80
FinishedMethod · 0.80
dataMethod · 0.80
SetTargetMethod · 0.80
SetListenThemeChangeMethod · 0.80
RecordFileMethod · 0.45
RobocopyViewModelMethod · 0.45
StartMethod · 0.45

Tested by

no test coverage detected